Browse Source

Import Debian version 4.24-4

Daniel Baumann 16 years ago
parent
commit
ece86694a2

+ 2 - 2
debian/control

@@ -2,7 +2,7 @@ Source: file
 Section: utils
 Priority: standard
 Maintainer: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 7), dpatch, autotools-dev, libtool, python, python-all-dev, python-all-dbg, zlib1g-dev
+Build-Depends: debhelper (>= 7), dpatch, autotools-dev, autoconf, automake, libtool, python, python-all-dev, python-all-dbg, zlib1g-dev
 Standards-Version: 3.8.0
 Homepage: http://www.darwinsys.com/file/
 Vcs-Browser: http://git.debian.net/?p=file.git
@@ -37,7 +37,7 @@ Package: libmagic-dev
 Section: libdevel
 Priority: optional
 Architecture: any
-Depends: libmagic1 (= ${binary:Version})
+Depends: libmagic1 (= ${binary:Version}), zlib1g-dev
 Suggests: file
 Description: File type determination library using "magic" numbers (development)
  This library can be used to classify files according to magic number tests. It

+ 1 - 0
debian/libmagic1.install

@@ -1,2 +1,3 @@
 /usr/lib/*.so.*
+/usr/share/file
 /usr/share/man/man5

+ 3 - 0
debian/libmagic1.links

@@ -0,0 +1,3 @@
+/usr/share/file/magic		/usr/share/misc/magic
+/usr/share/file/magic.mgc	/usr/share/misc/magic.mgc
+/usr/share/file/magic.mime	/usr/share/misc/magic.mime

+ 2 - 0
debian/patches/00list

@@ -30,6 +30,8 @@
 338-magic-add-cromfs.dpatch
 339-magic-add-scribus.dpatch
 340-magic-add-selinux.dpatch
+341-magic-add-bzr.dpatch
+901-file-mgc.dpatch
 903-file-localmagic.dpatch
 904-file-make.dpatch
 905-file-printf.dpatch

+ 20 - 0
debian/patches/341-magic-add-bzr.dpatch

@@ -0,0 +1,20 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 341-magic-add-bzr.dpatch by Jelmer Vernooij <jelmer@samba.org>
+##
+## DP: Adds new magics for bzr (Closes: #488742).
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/revision file/magic/Magdir/revision
+--- file.orig/magic/Magdir/revision	2008-07-01 15:42:16.000000000 +0200
++++ file/magic/Magdir/revision	2008-07-01 15:43:34.000000000 +0200
+@@ -22,3 +22,9 @@
+ # From:	Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
+ 0	string	SVN-fs-dump-format-version:	Subversion dumpfile
+ >28	string	>\0				(version: %s)
++
++# Type:	Bazaar revision bundles and merge requests
++# URL:	http://www.bazaar-vcs.org/
++# From:	Jelmer Vernooij <jelmer@samba.org>
++0	string	#\ Bazaar\ revision\ bundle\ v Bazaar Bundle
++0	string	#\ Bazaar\ merge\ directive\ format Bazaar merge directive

+ 51 - 0
debian/patches/901-file-mgc.dpatch

@@ -0,0 +1,51 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 901-file-mgc.dpatch by Daniel Baumann <daniel@debian.org>
+##
+## DP: Reverting upstream change of stopping to build plain magic file
+## DP: (Closes: #481247).
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
+--- file.orig/magic/Makefile.am	2008-07-01 18:24:19.000000000 +0200
++++ file/magic/Makefile.am	2008-07-01 18:24:26.000000000 +0200
+@@ -1,7 +1,7 @@
+ MAGIC_FRAGMENT_BASE = Magdir
+ MAGIC_FRAGMENT_DIR = $(top_srcdir)/magic/$(MAGIC_FRAGMENT_BASE)
+ 
+-pkgdata_DATA = magic.mgc
++pkgdata_DATA = magic.mgc magic
+ 
+ EXTRA_DIST = Header Localstuff \
+ $(MAGIC_FRAGMENT_DIR)/acorn \
+@@ -210,8 +210,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
+ $(MAGIC_FRAGMENT_DIR)/zilog \
+ $(MAGIC_FRAGMENT_DIR)/zyxel 
+ 
++RAW   = magic
+ MAGIC = magic.mgc
+-CLEANFILES = ${MAGIC}
++CLEANFILES = ${MAGIC} ${RAW}
++
++${RAW}: Header Localstuff $(EXTRA_DIST)
++	cat /dev/null > $@
++	for frag in $(EXTRA_DIST); do \
++	  if test -f $(srcdir)/$$frag; then \
++	    f=$(srcdir)/$$frag; \
++	  else \
++	    f=$$frag; \
++	  fi; \
++	  cat $$f; \
++	done >> $@
+ 
+ # FIXME: Build file natively as well so that it can be used to compile
+ # the target's magic file
+@@ -221,6 +233,5 @@ else
+ FILE_COMPILE = $(top_builddir)/src/file
+ endif
+ 
+-${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE)
+-	$(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR)
+-	@mv $(MAGIC_FRAGMENT_BASE).mgc $@
++${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE) $(RAW)
++	$(FILE_COMPILE) -C -m $(RAW)

+ 7 - 14
debian/rules

@@ -33,6 +33,12 @@ PYTHON_VERSIONS=$(shell pyversions -r debian/control)
 config.status: configure patch
 	dh_testdir
 
+	rm -f ltmain.sh
+	libtoolize --automake
+	aclocal
+	automake
+	autoconf
+
 	# Configuring package
 	mv config.sub config.sub.upstream && ln -s /usr/share/misc/config.sub
 	mv config.guess config.guess.upstream && ln -s /usr/share/misc/config.guess
@@ -107,21 +113,8 @@ install: build
 	mkdir -p debian/libmagic-dev/usr/include/file
 	cp src/file.h src/patchlevel.h debian/libmagic-dev/usr/include/file
 
-	# Build plain magic files for compatibility
+	# Installing plain magic.mime for compatibility
 	install -D -m 0644 debian/legacy/magic.mime debian/libmagic1/usr/share/file/magic.mime
-	cp magic/Header debian/libmagic1/usr/share/file/magic
-	cat magic/Localstuff >> debian/libmagic1/usr/share/file/magic
-	set -e; for FILE in magic/Magdir/*; \
-	do \
-		echo "Reading magic from $$FILE"; \
-		grep -v "^!:" $$FILE >> debian/libmagic1/usr/share/file/magic; \
-	done
-
-	# Instead of the installed magic.mgc use the compiled form of the
-	# plain magic file, as a workaround for #488562 (avoiding RC bug
-	# #481247).
-	rm -f debian/libmagic1/usr/share/file/magic.mgc
-	( cd debian/libmagic1/usr/share/file && ../../../../../src/file -m magic -C )
 
 	# Installing bug congtrols
 	install -D -m 0644 debian/bug/presubj debian/file/usr/share/bug/file/presubj