r13413 - in /trunk/libset-object-perl/debian: changelog rules

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Jan 24 11:05:48 UTC 2008


Author: dmn
Date: Thu Jan 24 11:05:48 2008
New Revision: 13413

URL: http://svn.debian.org/wsvn/?sc=1&rev=13413
Log:
* debian/rules:
  + split to DESTDIR and PREFIX
  + support noopt in DEB_BUILD_OPTIONS
  + split installation in separate install(-stamp) target
  + use "$@" when touching stamps

Modified:
    trunk/libset-object-perl/debian/changelog
    trunk/libset-object-perl/debian/rules

Modified: trunk/libset-object-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libset-object-perl/debian/changelog?rev=13413&op=diff
==============================================================================
--- trunk/libset-object-perl/debian/changelog (original)
+++ trunk/libset-object-perl/debian/changelog Thu Jan 24 11:05:48 2008
@@ -5,6 +5,11 @@
 
   [ Damyan Ivanov ]
   * debian/watch: use dist-based UTL, better pattern
+  * debian/rules:
+    + split to DESTDIR and PREFIX
+    + support noopt in DEB_BUILD_OPTIONS
+    + split installation in separate install(-stamp) target
+    + use "$@" when touching stamps
 
  -- gregor herrmann <gregor+debian at comodo.priv.at>  Wed, 09 Jan 2008 21:18:47 +0100
 

Modified: trunk/libset-object-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libset-object-perl/debian/rules?rev=13413&op=diff
==============================================================================
--- trunk/libset-object-perl/debian/rules (original)
+++ trunk/libset-object-perl/debian/rules Thu Jan 24 11:05:48 2008
@@ -4,10 +4,16 @@
 PERL	?= /usr/bin/perl
 
 package	:=$(firstword $(shell dh_listpackages))
-prefix	:= $(CURDIR)/debian/$(package)/usr
+TMP	:= $(CURDIR)/debian/$(package)
 
-version	:= $(shell dpkg-parsechangelog | \
-			sed -ne 's/^Version: *\([0-9]\+:\)*//p')
+# 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
 
 config:	config-stamp
 config-stamp:
@@ -17,26 +23,32 @@
 
 build:	build-stamp
 build-stamp: config-stamp
-	$(MAKE) LD_RUN_PATH=
+	dh_testdir
+	$(MAKE) LD_RUN_PATH= OPTIMIZE="$(CFLAGS)"
 	$(MAKE) test
 	touch $@
 
 clean:	checkroot
-	rm -f *-stamp
 	rm -f debian/changelog_generated.txt
-	dh_clean
+	dh_clean config-stamp build-stamp install-stamp
 	[ ! -f Makefile ] || $(MAKE) distclean
 
-binary-indep:	checkroot build
-
-binary-arch:	checkroot build
-	dh_clean
-	$(MAKE) pure_install PREFIX=$(prefix)
+install: install-stamp
+install-stamp: checkroot
+	dh_clean -k
+	
+	$(MAKE) pure_install DESTDIR=$(TMP) PREFIX=/usr
 	perldoc -t Changes.pod > debian/changelog_generated.txt
 	# As this is a architecture dependent package, we are not
 	# supposed to install stuff to /usr/share. MakeMaker creates
 	# the dirs, we delete them from the deb:
-	[ ! -d $(prefix)/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(prefix)/share/perl5
+	[ ! -d $(TMP)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/share/perl5
+	touch $@
+
+binary-indep:
+
+
+binary-arch:	checkroot install
 	dh_installdocs README
 	dh_installchangelogs debian/changelog_generated.txt
 	dh_strip




More information about the Pkg-perl-cvs-commits mailing list