From steinm at alioth.debian.org Wed Sep 1 11:44:18 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:44:18 +0000 Subject: [Dh-make-php-commits] r346 - trunk/man Message-ID: Author: steinm Date: 2010-09-01 11:44:17 +0000 (Wed, 01 Sep 2010) New Revision: 346 Modified: trunk/man/dh-make-pecl.xml Log: - added documentation for new option --phpversion Modified: trunk/man/dh-make-pecl.xml =================================================================== --- trunk/man/dh-make-pecl.xml 2010-02-12 20:06:49 UTC (rev 345) +++ trunk/man/dh-make-pecl.xml 2010-09-01 11:44:17 UTC (rev 346) @@ -104,6 +104,7 @@ + PACKAGE @@ -133,13 +134,17 @@ symlink php-<pecl-package-name>_<version>.orig.tar.gz pointing towards the original source. After creating the files you can go into then new directory and build the debian package - with dpkg-buildpackage -rfakeroot. This will (by default) - create php4-<pecl-package-name> and php5-<pecl-package-name> - binary packages. + with dpkg-buildpackage -rfakeroot. This will (for + version 0.2.x) + create php4-<pecl-package-name> and php5-<pecl-package-name> + binary packages. Since version 0.3.x only the binary package for php5 will + be build anymore. &dhpackage; tries to extract as much information about the package from the file package.xml which - is part of the pecl extension. + is part of the pecl extension. Though, there is some information like + depends on other debian packages, which must be given by options, e.g. + or . Debian source packages created by &dhpackage; can later easily be updated with uscan. @@ -231,6 +236,7 @@ + This option is deprecated. Use --phpversion. Set this to 4 or 5 in order to produce a debian package which creates a binary package for php4 or php5 only, but not for both. This is mostly @@ -239,6 +245,20 @@ + + + + Set this to 4, 5 or both separated by a space in order to + produce a debian package which + creates a binary package for the given php major versions. + This is mostly + useful if you want to create a pecl package for php4, which is + not created by default anymore since + &dhpackage; 0.3.0. + + + + From steinm at alioth.debian.org Wed Sep 1 11:45:41 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:45:41 +0000 Subject: [Dh-make-php-commits] r347 - trunk Message-ID: Author: steinm Date: 2010-09-01 11:45:39 +0000 (Wed, 01 Sep 2010) New Revision: 347 Modified: trunk/phppkginfo Log: - added new option 'hasphpscript' which checks if a package has a file with role='script'. It currently does not check if this is actually a php script Modified: trunk/phppkginfo =================================================================== --- trunk/phppkginfo 2010-09-01 11:44:17 UTC (rev 346) +++ trunk/phppkginfo 2010-09-01 11:45:39 UTC (rev 347) @@ -17,9 +17,26 @@ echo " license - License of package\n"; echo " date - Date of release\n"; echo " changelog - Full changelog of package\n"; + echo " hasphpscript - Check if package contains files of type 'script'\n"; echo " all - print_r() of complete package file\n"; } +function checkForPhpScript($content) { + foreach($content as $name=>$item) { + if($name == 'dir') { + return checkForPhpScript($item); + } elseif($name == 'file') { + foreach($item as $file) { + if($file['attribs']['role'] == 'script') { +// echo "Found file of type ".$file['attribs']['role'].": ".$file['attribs']['name']."\n"; + return 1; + } + } + } + } + return 0; +} + if($_SERVER["argc"] < 3) { usage(); exit; @@ -81,6 +98,10 @@ echo " ".str_replace("\n", "\n ", wordwrap(ereg_replace("[[:space:]]+", " ", $changelog["release_notes"])))."\n\n"; } break; + case "hasphpscript": + /* not yet implemented for verion 1.0 package files */ + echo "0"; + break; case "all": print_r($pf->_packageInfo); break; @@ -138,6 +159,11 @@ echo " ".str_replace("\n", "\n ", wordwrap(ereg_replace("[[:space:]]+", " ", $changelog["notes"])))."\n\n"; } break; + case "hasphpscript": + $content = $pf->_packageInfo['contents']; + $hasscript = checkForPhpScript($content); + echo $hasscript; + break; case "all": print_r($pf->_packageInfo); break; From steinm at alioth.debian.org Wed Sep 1 11:46:15 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:46:15 +0000 Subject: [Dh-make-php-commits] r348 - in trunk: pear.template pecl.template Message-ID: Author: steinm Date: 2010-09-01 11:46:14 +0000 (Wed, 01 Sep 2010) New Revision: 348 Modified: trunk/pear.template/control trunk/pecl.template/control Log: - updated Standards-Version: to 3.9.1 Modified: trunk/pear.template/control =================================================================== --- trunk/pear.template/control 2010-09-01 11:45:39 UTC (rev 347) +++ trunk/pear.template/control 2010-09-01 11:46:14 UTC (rev 348) @@ -3,7 +3,7 @@ Priority: optional Maintainer: ##maintainer## Build-Depends: debhelper (>= 7), dh-make-php (>= 0.2.3), cdbs -Standards-Version: 3.8.1 +Standards-Version: 3.9.1 Package: ##packagename## Architecture: ##architecture## Modified: trunk/pecl.template/control =================================================================== --- trunk/pecl.template/control 2010-09-01 11:45:39 UTC (rev 347) +++ trunk/pecl.template/control 2010-09-01 11:46:14 UTC (rev 348) @@ -3,5 +3,5 @@ Priority: optional Maintainer: ##maintainer## Build-Depends: debhelper (>= 7), po-debconf, xsltproc ##phpdevdepends## ##builddepends## -Standards-Version: 3.8.1 +Standards-Version: 3.9.1 From steinm at alioth.debian.org Wed Sep 1 11:47:19 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:47:19 +0000 Subject: [Dh-make-php-commits] r349 - trunk Message-ID: Author: steinm Date: 2010-09-01 11:47:18 +0000 (Wed, 01 Sep 2010) New Revision: 349 Modified: trunk/pear.mk Log: - get rid of the md5sum attributes in package.xml because it prevents from proper patching Modified: trunk/pear.mk =================================================================== --- trunk/pear.mk 2010-09-01 11:46:14 UTC (rev 348) +++ trunk/pear.mk 2010-09-01 11:47:18 UTC (rev 349) @@ -44,7 +44,9 @@ PEAR_NEW_TEST_DIR = $(PEAR_NEW_DOC_DIR)/tests common-configure-indep:: - ln -f -s ../package.xml $(PEAR_SOURCE_DIR) + # ln -f -s ../package.xml $(PEAR_SOURCE_DIR) + #remove md5sums to allow patching + cat package.xml | sed -e 's/md5sum="[^"]*"//' > $(PEAR_SOURCE_DIR)/package.xml clean:: -rm -f $(PEAR_PKG)-*/package.xml @@ -64,7 +66,7 @@ # move documentation to correct location mkdir -p $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR) - cp package.xml $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR) + cp $(PEAR_SOURCE_DIR)/package.xml $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR) if [ -d $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR) ] ; then \ mv -i $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR)/* $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR); \ rmdir $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR); \ From steinm at alioth.debian.org Wed Sep 1 11:48:23 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:48:23 +0000 Subject: [Dh-make-php-commits] r350 - trunk Message-ID: 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 +# Copyright (C) 2005-2010 by Uwe Steinmann # 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" \ From steinm at alioth.debian.org Wed Sep 1 11:48:43 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:48:43 +0000 Subject: [Dh-make-php-commits] r351 - trunk Message-ID: Author: steinm Date: 2010-09-01 11:48:43 +0000 (Wed, 01 Sep 2010) New Revision: 351 Modified: trunk/VERSION Log: - new version 0.3.0 Modified: trunk/VERSION =================================================================== --- trunk/VERSION 2010-09-01 11:48:23 UTC (rev 350) +++ trunk/VERSION 2010-09-01 11:48:43 UTC (rev 351) @@ -1 +1 @@ -0.2.16 +0.3.0 From steinm at alioth.debian.org Wed Sep 1 11:49:08 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:49:08 +0000 Subject: [Dh-make-php-commits] r352 - trunk/debian Message-ID: Author: steinm Date: 2010-09-01 11:49:05 +0000 (Wed, 01 Sep 2010) New Revision: 352 Modified: trunk/debian/changelog Log: - new version 0.3.0 Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2010-09-01 11:48:43 UTC (rev 351) +++ trunk/debian/changelog 2010-09-01 11:49:05 UTC (rev 352) @@ -1,3 +1,15 @@ +dh-make-php (0.3.0) unstable; urgency=low + + * option --only is deprecated, use --phpversion + * dh-make-pecl builds exten?ion for php5 only by default + * updated template files to standards version 3.9.1 (Closes: #572334) + * remove md5sums from package.xml before building to allow proper + patching (Closes: #525656) + * check for php scripts in the package that require php-cli and if so, + add a dependency on it (Closes: #464934) + + -- Uwe Steinmann Tue, 31 Aug 2010 10:32:35 +0200 + dh-make-php (0.2.16) unstable; urgency=low * --arch option is working again (Closes: #569044) From steinm at alioth.debian.org Wed Sep 1 11:50:14 2010 From: steinm at alioth.debian.org (Uwe Steinmann) Date: Wed, 1 Sep 2010 11:50:14 +0000 Subject: [Dh-make-php-commits] r353 - trunk/pecl.template Message-ID: Author: steinm Date: 2010-09-01 11:50:13 +0000 (Wed, 01 Sep 2010) New Revision: 353 Added: trunk/pecl.template/php.ini Log: - added missing template file for php.ini Added: trunk/pecl.template/php.ini =================================================================== --- trunk/pecl.template/php.ini (rev 0) +++ trunk/pecl.template/php.ini 2010-09-01 11:50:13 UTC (rev 353) @@ -0,0 +1 @@ +extension=##peclpackagename##.so