r12704 - in /trunk/libxml-libxml-common-perl/debian: changelog rules
ntyni at users.alioth.debian.org
ntyni at users.alioth.debian.org
Mon Jan 14 11:37:10 UTC 2008
Author: ntyni
Date: Mon Jan 14 11:37:10 2008
New Revision: 12704
URL: http://svn.debian.org/wsvn/?sc=1&rev=12704
Log:
* Various debian/rules cleanups:
+ use dh_listpackages instead of the name of the build directory to extract
the package name.
+ don't ignore the return value of 'make clean'.
+ clean with make 'distclean'.
+ add stamp files and inter-target dependencies
+ add support for DEB_BUILD_OPTIONS=noopt
+ build and test in the 'build' target instead of the 'install' one.
Modified:
trunk/libxml-libxml-common-perl/debian/changelog
trunk/libxml-libxml-common-perl/debian/rules
Modified: trunk/libxml-libxml-common-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libxml-libxml-common-perl/debian/changelog?rev=12704&op=diff
==============================================================================
--- trunk/libxml-libxml-common-perl/debian/changelog (original)
+++ trunk/libxml-libxml-common-perl/debian/changelog Mon Jan 14 11:37:10 2008
@@ -8,10 +8,15 @@
* debian/rules: delete /usr/share/perl5 only if it exists.
[ Niko Tyni ]
- * Use dh_listpackages instead of the name of the build directory to extract
- the package name.
* Upgrade to debhelper compatibility level 5.
- * Don't ignore the return value of 'make clean' and make 'distclean' instead.
+ * Various debian/rules cleanups:
+ + use dh_listpackages instead of the name of the build directory to extract
+ the package name.
+ + don't ignore the return value of 'make clean'.
+ + clean with make 'distclean'.
+ + add stamp files and inter-target dependencies
+ + add support for DEB_BUILD_OPTIONS=noopt
+ + build and test in the 'build' target instead of the 'install' one.
-- gregor herrmann <gregor+debian at comodo.priv.at> Sat, 01 Dec 2007 18:55:39 +0100
Modified: trunk/libxml-libxml-common-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libxml-libxml-common-perl/debian/rules?rev=12704&op=diff
==============================================================================
--- trunk/libxml-libxml-common-perl/debian/rules (original)
+++ trunk/libxml-libxml-common-perl/debian/rules Mon Jan 14 11:37:10 2008
@@ -7,11 +7,26 @@
PACKAGE=$(shell dh_listpackages)
+TMP=$(CURDIR)/debian/$(PACKAGE)
-build:
+# Allow disabling build optimation by setting noopt in
+# $DEB_BUILD_OPTIONS
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+build: build-stamp
+build-stamp:
dh_testdir
# Add here commands to compile the package.
perl Makefile.PL INSTALLDIRS=vendor
+ $(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
+ $(MAKE) test
+ touch $@
+
clean:
dh_testdir
dh_testroot
@@ -19,14 +34,16 @@
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
-install:
+install: install-stamp
+install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
- $(MAKE) PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr OPTIMIZE="-O2 -g -Wall" test install
- [ ! -d $(CURDIR)/debian/$(shell dh_listpackages)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(CURDIR)/debian/$(shell dh_listpackages)/usr/share/perl5
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+ [ ! -d $(TMP)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/share/perl5
+ touch $@
binary-indep:;
binary-arch: build install
More information about the Pkg-perl-cvs-commits
mailing list