[Dh-make-php-commits] r350 - trunk

Uwe Steinmann steinm at alioth.debian.org
Wed Sep 1 11:48:23 UTC 2010


Author: steinm
Date: 2010-09-01 11:48:23 +0000 (Wed, 01 Sep 2010)
New Revision: 350

Modified:
   trunk/dh-make-pear
   trunk/dh-make-pecl
Log:
- check for php script in package.xml which needs phpx-cli and sets
  the Depends field appropriatly


Modified: trunk/dh-make-pear
===================================================================
--- trunk/dh-make-pear	2010-09-01 11:47:18 UTC (rev 349)
+++ trunk/dh-make-pear	2010-09-01 11:48:23 UTC (rev 350)
@@ -9,7 +9,7 @@
 # at http://www.gnu.org/.
 
 PROGNAME=dh-make-pear
-PROGVERSION=0.2.16
+PROGVERSION=0.3.0
 PREFIX=/usr
 
 DEBPACKAGEPREFIX=php-
@@ -156,6 +156,11 @@
 install_docfiles
 install_expfiles
 
+HASPHPSCRIPT=$(${PHPPKGINFO} ${SRCPACKAGEDIR} hasphpscript)
+if [ "$HASPHPSCRIPT" = "1" ]; then
+	DEPENDS="${DEPENDS}, php5-cli"
+fi
+
 sed -e "s/##date##/`(LC_ALL=C; date -R)`/g" \
     -e "s/##maintainer##/${DEBMAINTAINER}/g" \
     -e "s/##upstream##/${UPSTREAM}/g" \

Modified: trunk/dh-make-pecl
===================================================================
--- trunk/dh-make-pecl	2010-09-01 11:47:18 UTC (rev 349)
+++ trunk/dh-make-pecl	2010-09-01 11:48:23 UTC (rev 350)
@@ -2,14 +2,14 @@
 #
 # dh-make-pecl creates a debian package from a pecl package
 #
-# Copyright (C) 2005-2006 by Uwe Steinmann <steinm at debian.org>
+# Copyright (C) 2005-2010 by Uwe Steinmann <steinm at debian.org>
 # under the GNU GPL license version 2.0 or 2.1.
 # You should have received a copy of the GPL license
 # along with this program if you did not you can find it
 # at http://www.gnu.org/.
 
 PROGNAME=dh-make-pecl
-PROGVERSION=0.2.16
+PROGVERSION=0.3.0
 PREFIX=/usr
 
 DEBPACKAGEPREFIX=php-
@@ -25,7 +25,7 @@
 DEPARCH=any
 DONTUSECONFD=false
 
-PHPVERSIONS="4 5"
+PHPVERSIONS="5"
 
 . ${PREFIX}/share/dh-make-php/dh-make-php.lib
 
@@ -51,9 +51,11 @@
   --templatedir   set alternative directory for templates
                   (default is ${DEBTEMPDIR})
   --only          set PHP major version (4 or 5) to build modules for
-                  (default is both)
+                  (default is both) THIS OPTION IS DEPRECATED!!!!
+  --phpversion    set the PHP major versions to build modules for
+                  (default is 5)
   --dont-use-confd  do not create package with ps.ini in conf.d, but modify
-	                global php.ini by debconf
+                  global php.ini by debconf
 eof
 }
 # }}}
@@ -96,6 +98,9 @@
 			DEBTEMPDIR="$2"; shift
 			;;
 		--only) # only create modules for one of php4|php5
+			echo "The option --only is deprecated. Please check the manual page."
+			exit 0
+
 			PHPVERSIONS=$2; shift
 			if [ "$PHPVERSIONS" != "4" ] && [ "$PHPVERSIONS" != "5" ]
 			then
@@ -103,6 +108,14 @@
 				exit 0
 			fi
 			;;
+		--phpversion) # create modules for the given php versions
+			PHPVERSIONS=$2; shift
+			echo $PHPVERSIONS | grep "[4-5] [4-5]"
+			if [[ $? -eq 0 ]] ; then
+				echo "Invalid argument to --phpversion."
+				exit 0
+			fi
+			;;
 		--dont-use-confd) # place ini file in conf.d
 			DONTUSECONFD=true;
 			;;
@@ -278,6 +291,10 @@
 	fi
 done
 
+HASPHPSCRIPT=$(${PHPPKGINFO} ${SRCPACKAGEDIR} hasphpscript)
+if [ "$HASPHPSCRIPT" = "1" ]; then
+	DEPENDS="${DEPENDS}, php${PHPVERSION}-cli"
+fi
 
 sed -e "s/##packagename##/${DEBPACKAGEPREFIX}${PHP_PKG_LOWNAME}/g" \
     -e "s/##maintainer##/${DEBMAINTAINER}/g" \




More information about the Dh-make-php-commits mailing list