r15129 - in /trunk/libclass-date-perl/debian: changelog rules

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Feb 18 21:19:01 UTC 2008


Author: dmn
Date: Mon Feb 18 21:19:00 2008
New Revision: 15129

URL: http://svn.debian.org/wsvn/?sc=1&rev=15129
Log:
* debian/rules: sync with current dh-make-perl templates

Modified:
    trunk/libclass-date-perl/debian/changelog
    trunk/libclass-date-perl/debian/rules

Modified: trunk/libclass-date-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libclass-date-perl/debian/changelog?rev=15129&op=diff
==============================================================================
--- trunk/libclass-date-perl/debian/changelog (original)
+++ trunk/libclass-date-perl/debian/changelog Mon Feb 18 21:19:00 2008
@@ -9,6 +9,7 @@
 
   [ Damyan Ivanov ]
   * debian/watch: better pattern
+  * debian/rules: sync with current dh-make-perl templates
 
  -- gregor herrmann <gregor+debian at comodo.priv.at>  Sat, 01 Dec 2007 18:54:47 +0100
 

Modified: trunk/libclass-date-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libclass-date-perl/debian/rules?rev=15129&op=diff
==============================================================================
--- trunk/libclass-date-perl/debian/rules (original)
+++ trunk/libclass-date-perl/debian/rules Mon Feb 18 21:19:00 2008
@@ -5,42 +5,49 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This is the debhelper compatibility version to use.
-# export DH_COMPAT=4
-
-PACKAGE=`pwd | sed -e "s/.*\/\\(.*\\)-.*/\\1/"`
+PACKAGE = $(shell dh_listpackages)
+TMP     = $(CURDIR)/debian/$(PACKAGE)
+PERL   ?= /usr/bin/perl
+CFLAGS  = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+    CFLAGS += -O0
+else
+    CFLAGS += -O2
+endif
 
 
-build:
+build: build-stamp
+build-stamp:
 	dh_testdir
 	# Add here commands to compile the package.
-	perl Makefile.PL verbose INSTALLDIRS=vendor
+	$(PERL) Makefile.PL verbose INSTALLDIRS=vendor
+	$(MAKE) OPTIMIZE="$(CFLAGS)"
+	$(MAKE) test
+	touch $@
+
 clean:
 	dh_testdir
 	dh_testroot
 
-	-$(MAKE) clean
-	rm -f Makefile.old
-	dh_clean
+	dh_clean install-stamp build-stamp
+	[ ! -e Makefile ] || $(MAKE) distclean
 
-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
-	chmod -x $(CURDIR)/debian/$(PACKAGE)/usr/lib/perl5/Class/Date.pod
-	[ ! -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) PREFIX=/usr DESTDIR=$(TMP) install
+	chmod -x $(TMP)/usr/lib/perl5/Class/Date.pod
+	[ ! -d $(TMP)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/share/perl5
 
-binary-indep:;
-binary-arch: build install;
+binary-indep:
+binary-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installdocs
-	dh_installman
 	dh_installchangelogs Changes
-	dh_link
 	dh_strip
 	dh_compress
 	dh_fixperms
@@ -52,4 +59,4 @@
 	dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install




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