Browse Source

Import Debian version 4.20-8

Daniel Baumann 17 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
 Priority: standard
 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
 XS-Python-Version: all
 
@@ -54,6 +54,7 @@ Priority: extra
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
 Provides: ${python:Provides}
+Suggests: python-magic-dbg
 XB-Python-Version: ${python:Versions}
 Description: File type determination library using "magic" numbers (python bindings)
  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
  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 \
 			-L$(CURDIR)/src/.libs); \
 	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
 
@@ -81,9 +85,17 @@ install: build
 	for python in $(PYTHON_VERSIONS); \
 	do \
 		(cd python && $$python setup.py install --no-compile \
-			--prefix=$(CURDIR)/debian/python-magic/usr); \
+			--root=$(CURDIR)/debian/python-magic); \
 	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
 	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
@@ -107,7 +119,14 @@ binary-arch: build install
 	dh_install --sourcedir=debian/tmp
 	dh_python
 	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_fixperms
 	dh_makeshlibs