[Pkg-php-commits] r978 - pear/php-log/trunk/debian

Gregory Colpart reg-guest at alioth.debian.org
Mon Jan 21 01:39:23 UTC 2008


Author: reg-guest
Date: 2008-01-21 01:39:23 +0000 (Mon, 21 Jan 2008)
New Revision: 978

Modified:
   pear/php-log/trunk/debian/changelog
   pear/php-log/trunk/debian/rules
Log:
Upgrade debian/rules to have unform PEAR packaging (See http://wiki.debian.org/GregoryColpart/PearPolicyDraft)


Modified: pear/php-log/trunk/debian/changelog
===================================================================
--- pear/php-log/trunk/debian/changelog	2008-01-21 01:28:11 UTC (rev 977)
+++ pear/php-log/trunk/debian/changelog	2008-01-21 01:39:23 UTC (rev 978)
@@ -7,9 +7,10 @@
   * Update description like in package.xml.
   * Remove php-mdb2 from Suggests (php-mdb2 isn't in Debian).
   * Add Vcs-* fields in debian/control.
-  * Move to team maintainership. 
+  * Move to team maintainership.
+  * Upgrade debian/rules to have unform PEAR packaging. 
 
- -- Gregory Colpart (evolix) <reg at evolix.fr>  Mon, 21 Jan 2008 02:27:18 +0100
+ -- Gregory Colpart (evolix) <reg at evolix.fr>  Mon, 21 Jan 2008 02:36:53 +0100
 
 php-log (1.9.11-1) unstable; urgency=low
 

Modified: pear/php-log/trunk/debian/rules
===================================================================
--- pear/php-log/trunk/debian/rules	2008-01-21 01:28:11 UTC (rev 977)
+++ pear/php-log/trunk/debian/rules	2008-01-21 01:39:23 UTC (rev 978)
@@ -5,6 +5,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
+DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
+DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
+
 PEAR ?= /usr/bin/pear
 pear_pkg = $(shell ls |grep Log)
 package = php-log
@@ -36,7 +40,18 @@
 
 	# Add here commands to install the package into debian/package.
 	cp package.xml $(pear_pkg)/package.xml;
-	$(PEAR) install -n -R debian/$(package) $(pear_pkg)/package.xml;
+	$(PEAR) \
+		-c debian/pearrc \
+		-d include_path=/usr/share/php \
+		-d php_bin=/usr/bin/php \
+		-d bin_dir=/usr/bin \
+		-d php_dir=/usr/share/php \
+		-d data_dir=/usr/share/php/data \
+		-d doc_dir=/usr/share/php/docs \
+		-d test_dir=/usr/share/php/tests \
+		install -n -f -P debian/$(package) $(pear_pkg)/package.xml
+
+	# remove unwanted files
 	rm -f debian/$(package)/usr/share/php/.filemap;
 	rm -f debian/$(package)/usr/share/php/.lock;
 	rm -rf debian/$(package)/usr/share/php/.channels;
@@ -44,15 +59,13 @@
 	rm -rf debian/$(package)/usr/share/php/.depdb;
 	rm -rf debian/$(package)/usr/share/php/.registry/.channel.pecl.php.net;
 	rm -rf debian/$(package)/usr/share/php/.registry/.channel.__uri;
+	rm -rf debian/$(package)/tmp
 
 	# remove duplicated files, these files are in /usr/share/doc/package
-	rm -rf debian/$(package)/usr/share/php/docs;
-	rm -rf debian/$(package)/usr/share/php/tests;
-	rm -rf debian/$(package)/usr/share/php/data/Log/misc;
+	rm -rf debian/$(package)/usr/share/php/tests \
+		debian/$(package)/usr/share/php/docs \
+		debian/$(package)/usr/share/php/data/Log/misc
 
-	# remove created tmp dir
-	rm -rf debian/$(package)/tmp
-
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.
@@ -73,3 +86,8 @@
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
+
+get-orig-source:
+	wget http://download.pear.php.net/package/Log-${DEB_UPSTREAM_VERSION}.tgz \
+	    -O php-log_${DEB_UPSTREAM_VERSION}.orig.tar.gz
+




More information about the Pkg-php-commits mailing list