r13511 - in /trunk/libunicode-string-perl/debian: changelog rules

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Fri Jan 25 10:49:26 UTC 2008


Author: dmn
Date: Fri Jan 25 10:49:26 2008
New Revision: 13511

URL: http://svn.debian.org/wsvn/?sc=1&rev=13511
Log:
* debian/rules: cleanup
  + allow overriding of perl being used (by $(PERL))
  + use dh_listpackages instead of hard-coded package name
  + use $(CURDIR) instead of $(shell pwd)
  + allow disabling build optimation by setting noopt in $DEB_BUILD_OPTIONS
  + do not ignore test suite errors
  + use "$@" when touching stamps
  + use dh_clean for removing stamp files
  + remove unused dh_installdirs and dh_installman
  + move dh_installdocs and dh_installchangelogs deom install-stamp to
    binary-arch target
  + add dh_testroot to binary-arch target
  + .PHONY: remove checkroot, add install and build

Modified:
    trunk/libunicode-string-perl/debian/changelog
    trunk/libunicode-string-perl/debian/rules

Modified: trunk/libunicode-string-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libunicode-string-perl/debian/changelog?rev=13511&op=diff
==============================================================================
--- trunk/libunicode-string-perl/debian/changelog (original)
+++ trunk/libunicode-string-perl/debian/changelog Fri Jan 25 10:49:26 2008
@@ -1,6 +1,22 @@
 libunicode-string-perl (2.09-3) UNRELEASED; urgency=low
 
+  [ gregor herrmann ]
   * debian/rules: delete /usr/share/perl5 only if it exists.
+
+  [ Damyan Ivanov ]
+  * debian/rules: cleanup
+    + allow overriding of perl being used (by $(PERL))
+    + use dh_listpackages instead of hard-coded package name
+    + use $(CURDIR) instead of $(shell pwd)
+    + allow disabling build optimation by setting noopt in $DEB_BUILD_OPTIONS
+    + do not ignore test suite errors
+    + use "$@" when touching stamps
+    + use dh_clean for removing stamp files
+    + remove unused dh_installdirs and dh_installman
+    + move dh_installdocs and dh_installchangelogs deom install-stamp to
+      binary-arch target
+    + add dh_testroot to binary-arch target
+    + .PHONY: remove checkroot, add install and build
 
  -- gregor herrmann <gregor+debian at comodo.priv.at>  Wed, 09 Jan 2008 21:19:14 +0100
 

Modified: trunk/libunicode-string-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libunicode-string-perl/debian/rules?rev=13511&op=diff
==============================================================================
--- trunk/libunicode-string-perl/debian/rules (original)
+++ trunk/libunicode-string-perl/debian/rules Fri Jan 25 10:49:26 2008
@@ -1,45 +1,53 @@
 #!/usr/bin/make -f
 
-package=libunicode-string-perl
-tempdir=$(shell pwd)/debian/$(package)
+PERL ?= /usr/bin/perl
+package=$(shell dh_listpackages)
+tempdir=$(CURDIR)/debian/$(package)
 arch=$(shell dpkg --print-architecture)
+
+# 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
-	perl Makefile.PL INSTALLDIRS=vendor
-	$(MAKE) OPTIMIZE="-O2 -g -Wall" all
-	-$(MAKE) test
-	touch build-stamp
+	$(PERL) Makefile.PL INSTALLDIRS=vendor
+	$(MAKE) OPTIMIZE="$(CFLAGS)" all
+	$(MAKE) test
+	touch $@
 
 clean:
 	dh_testdir
 	dh_testroot
-	-rm -f build-stamp install-stamp
+	dh_clean build-stamp install-stamp
 	if [ -e Makefile ]; then  \
 		$(MAKE) distclean; \
 	else \
 		perl Makefile.PL && $(MAKE) distclean; \
 	fi;
-	dh_clean
 
 install: install-stamp
 install-stamp: build-stamp
 	dh_testdir
 	dh_testroot
 	dh_clean -k
-	dh_installdirs
-	$(MAKE) PREFIX=$(tempdir)/usr install
+	$(MAKE) DESTDIR=$(tempdir) PREFIX=/usr install
 	[ ! -d $(tempdir)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(tempdir)/usr/share/perl5
-	dh_installdocs
-	dh_installman
-	dh_installchangelogs Changes
-	touch install-stamp
+	touch $@
 
 binary-indep: build install
 
 binary-arch: build install
 	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installchangelogs Changes
 	dh_compress
 	dh_strip
 	dh_fixperms
@@ -52,7 +60,7 @@
 
 # Below here is fairly generic really
 binary: binary-indep binary-arch
-.PHONY: binary clean checkroot
+.PHONY: binary clean install build
 
 #Local variables:
 #mode: makefile




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