Browse Source

Import Debian version 4.20-8

Daniel Baumann 18 years ago
parent
commit
8479cb65c9
2 changed files with 37 additions and 3 deletions
  1. 16 1
      debian/control
  2. 21 2
      debian/rules

+ 16 - 1
debian/control

@@ -2,7 +2,7 @@ Source: file
 Section: utils
 Section: utils
 Priority: standard
 Priority: standard
 Maintainer: Daniel Baumann <daniel@debian.org>
 Maintainer: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 5.0.37.2), dpatch, autotools-dev, libtool, python, python-all-dev, zlib1g-dev
+Build-Depends: debhelper (>= 5.0.37.2), dpatch, autotools-dev, libtool, python, python-all-dev, python-all-dbg, zlib1g-dev
 Standards-Version: 3.7.2
 Standards-Version: 3.7.2
 XS-Python-Version: all
 XS-Python-Version: all
 
 
@@ -54,6 +54,7 @@ Priority: extra
 Architecture: any
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
 Provides: ${python:Provides}
 Provides: ${python:Provides}
+Suggests: python-magic-dbg
 XB-Python-Version: ${python:Versions}
 XB-Python-Version: ${python:Versions}
 Description: File type determination library using "magic" numbers (python bindings)
 Description: File type determination library using "magic" numbers (python bindings)
  This library can be used to classify files according to magic number tests. It
  This library can be used to classify files according to magic number tests. It
@@ -63,3 +64,17 @@ Description: File type determination library using "magic" numbers (python bindi
  .
  .
  This package contains the python bindings to query /etc/magic information for a
  This package contains the python bindings to query /etc/magic information for a
  given file in Python.
  given file in Python.
+
+Package: python-magic-dbg
+Section: python
+Architecture: any
+Priority: extra
+Depends: python-magic (= ${Source-Version}), python-dbg, ${shlibs:Depends}
+Description: File type determination library using "magic" numbers (python bindings/debug)
+ This library can be used to classify files according to magic number tests. It
+ implements the core functionality of the file command.
+ .
+  Homepage: <http://www.darwinsys.com/file/>
+ .
+ This package contains the python bindings to query /etc/magic information for a
+ given file in Python, built for the python debug interpreter.

+ 21 - 2
debian/rules

@@ -48,6 +48,10 @@ build-stamp: config.status
 		(cd python && $$python setup.py build_ext \
 		(cd python && $$python setup.py build_ext \
 			-L$(CURDIR)/src/.libs); \
 			-L$(CURDIR)/src/.libs); \
 	done
 	done
+	set -e; \
+	for python in $(PYTHON_VERSIONS); do \
+		(cd python && $$python-dbg setup.py build_ext -L$(CURDIR)/src/.libs); \
+	done
 
 
 	touch build-stamp
 	touch build-stamp
 
 
@@ -81,9 +85,17 @@ install: build
 	for python in $(PYTHON_VERSIONS); \
 	for python in $(PYTHON_VERSIONS); \
 	do \
 	do \
 		(cd python && $$python setup.py install --no-compile \
 		(cd python && $$python setup.py install --no-compile \
-			--prefix=$(CURDIR)/debian/python-magic/usr); \
+			--root=$(CURDIR)/debian/python-magic); \
 	done
 	done
 
 
+	set -e; \
+	for python in $(PYTHON_VERSIONS); do \
+		(cd python && $$python-dbg setup.py install --no-compile \
+			--root=$(CURDIR)/debian/python-magic-dbg); \
+	done
+	find debian/python-*-dbg ! -type d ! -name '*.so' | xargs rm -f
+	find debian/python-*-dbg -depth -empty -exec rmdir {} \;
+
 	# Installing bug congtrols
 	# Installing bug congtrols
 	install -D -m 0644 debian/bug/presubj debian/file/usr/share/bug/file/presubj
 	install -D -m 0644 debian/bug/presubj debian/file/usr/share/bug/file/presubj
 	install -D -m 0644 debian/bug/control debian/libmagic1/usr/share/bug/libmagic1/control
 	install -D -m 0644 debian/bug/control debian/libmagic1/usr/share/bug/libmagic1/control
@@ -107,7 +119,14 @@ binary-arch: build install
 	dh_install --sourcedir=debian/tmp
 	dh_install --sourcedir=debian/tmp
 	dh_python
 	dh_python
 	dh_link
 	dh_link
-	dh_strip
+ifeq (,$(findstring -i, $(DH_OPTIONS)))
+	dh_strip -Npython-magic -Npython-magic-dbg
+	DH_OPTIONS= dh_strip -ppython-magic --dbg-package=python-magic-dbg
+
+	rm -rf debian/python-magic-dbg/usr/share/doc/python-magic-dbg
+	mkdir -p debian/python-magic-dbg/usr/share/doc
+	ln -s python-magic debian/python-magic-dbg/usr/share/doc/python-magic-dbg
+endif
 	dh_compress
 	dh_compress
 	dh_fixperms
 	dh_fixperms
 	dh_makeshlibs
 	dh_makeshlibs