r13296 - in /trunk/libmarc-charset-perl/debian: changelog rules

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Wed Jan 23 13:28:18 UTC 2008


Author: dmn
Date: Wed Jan 23 13:28:18 2008
New Revision: 13296

URL: http://svn.debian.org/wsvn/?sc=1&rev=13296
Log:
* debian/rules:
  + allow compiling with -O0 when DEB_BUILD_OPTIONS contains noopt
  + use "$@" when touching stamps
  + move test suite from install to build target
  + remove stamps before realclean
  + drop unneeded argument-less dh_link call

Modified:
    trunk/libmarc-charset-perl/debian/changelog
    trunk/libmarc-charset-perl/debian/rules

Modified: trunk/libmarc-charset-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libmarc-charset-perl/debian/changelog?rev=13296&op=diff
==============================================================================
--- trunk/libmarc-charset-perl/debian/changelog (original)
+++ trunk/libmarc-charset-perl/debian/changelog Wed Jan 23 13:28:18 2008
@@ -8,6 +8,12 @@
 
   [ Damyan Ivanov ]
   * debian/watch: use dist-based URL; better pattern
+  * debian/rules:
+    + allow compiling with -O0 when DEB_BUILD_OPTIONS contains noopt
+    + use "$@" when touching stamps
+    + move test suite from install to build target
+    + remove stamps before realclean
+    + drop unneeded argument-less dh_link call
 
  -- gregor herrmann <gregor+debian at comodo.priv.at>  Tue, 09 Oct 2007 22:30:18 +0200
 

Modified: trunk/libmarc-charset-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libmarc-charset-perl/debian/rules?rev=13296&op=diff
==============================================================================
--- trunk/libmarc-charset-perl/debian/rules (original)
+++ trunk/libmarc-charset-perl/debian/rules Wed Jan 23 13:28:18 2008
@@ -19,42 +19,52 @@
 
 TMP     =$(CURDIR)/debian/$(PACKAGE)
 
+# 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
 
 	# Compile the package
 	$(PERL) Makefile.PL INSTALLDIRS=vendor
-	$(MAKE) OPTIMIZE="-Wall -O2 -g"
+	$(MAKE) OPTIMIZE="$(CFLAGS)"
+	$(MAKE) test
 
-	touch build-stamp
+	touch $@
 
 clean:
 	dh_testdir
 	dh_testroot
+
+	dh_clean build-stamp install-stamp
 
 	# Clean up after the build process
 	[ ! -f Makefile ] || $(MAKE) realclean
 	rm -f lib/MARC/Charset/Table.dir
 	rm -f lib/MARC/Charset/Table.pag
 
-	dh_clean build-stamp install-stamp
-
-install: build install-stamp
-install-stamp:
+install: install-stamp
+install-stamp: build-stamp
 	dh_testdir
 	dh_testroot
 	dh_clean -k
 
-	# Install the package into debian/$PACKAGE_NAME 
-	$(MAKE) test
+	# Install the package into $(TMP)
 	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
 
 	# The perl modules are architecture-independent, so they go in
 	# /usr/share. Remove the empty /usr/lib/perl5 created by MakeMaker.
 	[ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
 
-	touch install-stamp
+	touch $@
 
 binary-indep:
 # We have nothing to do.
@@ -75,7 +85,6 @@
 	dh_link usr/lib/$(PACKAGE)/Table.dir usr/share/perl5/MARC/Charset/Table.dir
 	dh_link usr/lib/$(PACKAGE)/Table.pag usr/share/perl5/MARC/Charset/Table.pag
 
-	dh_link
 	dh_strip
 	dh_compress
 	dh_fixperms




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