[libfann] 94/133: Convert debian/rules to classic syntax

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:07:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to branch master
in repository libfann.

commit 450096b7727570718a55e12f0be7a9bff6647713
Author: Christian Kastner <debian at kvr.at>
Date:   Sat Jun 11 03:23:31 2011 +0200

    Convert debian/rules to classic syntax
    
    Provide build-arch and build-indep targets. Closes: #630100
---
 debian/rules | 132 +++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 97 insertions(+), 35 deletions(-)

diff --git a/debian/rules b/debian/rules
index 555d57c..e223962 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,34 +17,50 @@ endif
 PYVERS = $(shell pyversions -r -v)
 
 
-%:
-	dh $@ --with autotools_dev
+binary: binary-arch binary-indep
+build: build-arch build-indep
+install: install-arch install-indep
 
-override_dh_auto_build:
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	dh_autotools-dev_updateconfig
+	dh_auto_configure
+
+
+build-arch: build-arch-stamp
+build-arch-stamp: configure-stamp
 	# Perform regular build process
-	dh_auto_build
+	dh_auto_build -a
 	
 	# Build python extensions in python/
 	cd python; \
 	for py in $(PYVERS); do \
 		python$$py setup.py build; \
 	done
+
+
+build-indep: build-indep-stamp
+build-indep-stamp:
+	dh_testdir
 	
 	# Build documentation
 	mkdir -p doc/html doc/proj
 	naturaldocs -i src/include -o HTML doc/html -p doc/proj
 
-override_dh_auto_clean:
-	# Perform regular clean process
-	dh_auto_clean
+
+install-arch:
+	dh_testdir
+	dh_testroot
+	dh_prep -a
+	dh_installdirs -a
+	dh_auto_install -a
 	
-	# Remove python extensions build directory
-	rm -rf python/build
+	# Clear .la dependency_libs as required by Policy 10.2
+	sed -i -e "s/dependency_libs='.*'/dependency_libs=''/" \
+		debian/tmp/usr/lib/*.la
 	
-	# Remove output generated by naturaldocs
-	rm -rf doc/proj doc/html
-
-override_dh_auto_install:
 	# Install python extensions from python/, so dh_pysupport can pick them up
 	cd python; \
 	for py in $(PYVERS); do \
@@ -52,31 +68,52 @@ override_dh_auto_install:
 			--install-layout=deb; \
 	done
 	
-	# Continue with regular installation process
-	dh_auto_install
-	
-	# Clear .la dependency_libs as required by Policy 10.2
-	sed -i -e "s/dependency_libs='.*'/dependency_libs=''/" \
-		debian/tmp/usr/lib/*.la
+	dh_install -a
+
 
-override_dh_strip:
+install-indep:
+	dh_testdir
+	dh_testroot
+	dh_prep -i
+	dh_installdirs -i
+	dh_install -i
+
+
+binary-arch: build-arch install-arch
+	dh_installdocs -a
+	dh_installchangelogs -a
+	dh_pysupport -a
+	
+	# Point doc of -dbg packages to their regular counterparts
+	rm -rf debian/libfann-dbg/usr/share/doc/libfann-dbg
+	rm -rf debian/python-pyfann-dbg/usr/share/doc/python-pyfann-dbg
+	dh_link -a
+	dh_compress -a
+	dh_fixperms -a
+	
 	# Can't use --dbg-package because we have multiple debug packages
-	dh_strip -k
+	dh_strip -k -a
 	mv debian/libfann2/usr/lib/debug debian/libfann-dbg/usr/lib
 	mv debian/python-pyfann/usr/lib/debug debian/python-pyfann-dbg/usr/lib
 	cd debian/python-pyfann-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules
+	
+	dh_makeshlibs -a
+	dh_shlibdeps -a
+	dh_installdeb -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
 
-override_dh_installexamples:
-	# Perform regular examples install process
-	dh_installexamples
 
-	# Copy python examples to a subdir in examples/
+binary-indep: build-indep install-indep
+	dh_installdocs -i 
+	dh_installchangelogs -i
+	dh_installexamples -i
+	
+	# Copy Python examples to a subdir in examples/
 	cp -r python/examples \
 		debian/libfann-doc/usr/share/doc/libfann-doc/examples/python
 	
-	# Remove unnecessary executable bits from training data sets
-	chmod 644 debian/libfann-doc/usr/share/doc/libfann-doc/examples/datasets/*
-	
 	# Modify dataset paths in examples to point to libfann-doc datasets. This
 	# was not implemented as a patch to upstream to preserve the ability to
 	# run upstream's own tests within the source dir.
@@ -89,12 +126,37 @@ override_dh_installexamples:
 		debian/libfann-doc/usr/share/doc/libfann-doc/examples/Makefile
 	cp debian/README-libfann2-examples \
 		debian/libfann-doc/usr/share/doc/libfann-doc/examples/README
+	
+	# Don't compress example files and datasets; documentation .js
+	dh_compress -i -Xexamples -Xjavascript
+	
+	dh_fixperms -i
+	# Remove unnecessary executable bits from training data sets
+	chmod 644 debian/libfann-doc/usr/share/doc/libfann-doc/examples/datasets/*
+	
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
 
-override_dh_link:
-	rm -rf debian/libfann-dbg/usr/share/doc/libfann-dbg
-	rm -rf debian/python-pyfann-dbg/usr/share/doc/python-pyfann-dbg
-	dh_link
 
-override_dh_compress:
-	# Don't compress example files and datasets; documentation .js
-	dh_compress -Xexamples -Xjavascript
+clean:
+	dh_testdir
+	dh_autotools-dev_restoreconfig
+	
+	# Perform regular clean process
+	dh_auto_clean
+	dh_clean
+	
+	# Clean up Python stuff
+	rm -rf python/build python/pyfann/*.cxx
+	
+	# Remove output generated by naturaldocs
+	rm -rf doc/proj doc/html
+	
+	# Finalize
+	rm -f configure-stamp build-arch-stamp build-indep-stamp
+
+
+.PHONY: binary configure build install clean
+.PHONY: binary-arch binary-indep build-arch build-indep install-arch install-indep

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git



More information about the debian-science-commits mailing list