summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authornima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-12-22 22:40:51 +0000
committernima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-12-22 22:40:51 +0000
commitd866a378dbc4645d224f06dfd41c5ca793690e81 (patch)
tree8a46dfb9640f3550fb01e94ff90e95c06df34091 /debian/rules
parent25f310ab03c3010d89b0cafa989aeab94bcda58f (diff)
downloadpython-dmidecode-d866a378dbc4645d224f06dfd41c5ca793690e81.tar.gz
python-dmidecode-d866a378dbc4645d224f06dfd41c5ca793690e81.tar.xz
python-dmidecode-d866a378dbc4645d224f06dfd41c5ca793690e81.zip
Applied the nice changes suggested by Piotr Ożarowsk.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@164 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules67
1 files changed, 35 insertions, 32 deletions
diff --git a/debian/rules b/debian/rules
index 5fcfc15..5874172 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,47 +1,43 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
-PYDEF = $(shell pyversions -d)
-PYVERS = $(shell pyversions -r)
+PYVERS = $(shell pyversions -vr)
-
-#############
-### Build ###
+################################################################################
+#. Build
build: build-stamp
-build-stamp: $(PYVERS:%=build-ext-%)
+build-stamp: $(PYVERS:%=build-ext-%) $(PYVERS:%=build-dbg-ext-%)
dh_testdir
- #docbook-to-man debian/python-dmidecode.sgml > python-dmidecode.1
- #$(MAKE) -f Makefile
touch $@
build-ext-%:
- $(subst $(PYDEF),python,$*) src/setup.py build
+ python$* src/setup.py build
+ touch $@
+build-dbg-ext-%:
+ python$*-dbg src/setup.py build
+ touch $@
-###############
-### Install ###
+################################################################################
+#. Install
install: install-stamp
dh_testdir
dh_testroot
dh_installdirs
- #$(MAKE) DESTDIR=$(CURDIR)/debian/python-dmidecode install
-install-stamp: build-stamp $(PYVERS:%=install-ext-%)
+install-stamp: build-stamp $(PYVERS:%=install-ext-%) $(PYVERS:%=install-dbg-ext-%)
install-ext-%:
- $(subst $(PYDEF),python,$*) src/setup.py install --root $(CURDIR)/debian/python-dmidecode
-
-
-#############
-### Clean ###
-clean:
- dh_testdir
- dh_testroot
- -rm -f build-stamp configure-stamp
- -rm -rf $(CURDIR)/debian/python-dmidecode
- $(MAKE) -f Makefile clean
- dh_clean
-
+ python$* src/setup.py install --root $(CURDIR)/debian/python-dmidecode
+ touch $@
+install-dbg-ext-%:
+ python$*-dbg src/setup.py install --root $(CURDIR)/debian/python-dmidecode-dbg
+ find $(CURDIR)/debian/python-dmidecode-dbg/usr/lib/python$*/ ! -type d ! -name '*_d\.so' -delete
+ find $(CURDIR)/debian/python-dmidecode-dbg/usr/lib/python$*/ -depth -empty -delete
+ touch $@
-binary-indep: build install
+################################################################################
+#. Binary
+binary: binary-indep binary-arch
+binary-indep:
binary-arch: build install
dh_testdir
dh_testroot
@@ -49,19 +45,26 @@ binary-arch: build install
dh_installdocs
dh_installexamples
dh_install
-# dh_python
-# dh_pysupport
dh_pycentral
dh_installman
dh_strip
dh_compress
dh_fixperms
-# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+
+################################################################################
+#. Clean
+clean:
+ dh_testdir
+ dh_testroot
+ $(MAKE) -f Makefile clean
+ dh_clean build-stamp install-stamp \
+ $(PYVERS:%=install-ext-%) $(PYVERS:%=build-ext-%) \
+ $(PYVERS:%=install-dbg-ext-%) $(PYVERS:%=build-dbg-ext-%)
+
+.PHONY: build clean binary-indep binary-arch binary install