[Dh-make-php-commits] r238 - in trunk: . pecl.template
Uwe Steinmann
steinm at alioth.debian.org
Fri Feb 16 22:52:30 CET 2007
Author: steinm
Date: 2007-02-16 22:52:30 +0100 (Fri, 16 Feb 2007)
New Revision: 238
Modified:
trunk/dh-make-pecl
trunk/pecl.template/rules
Log:
- added support for ini files in /etc/php[45]/conf.d
Modified: trunk/dh-make-pecl
===================================================================
--- trunk/dh-make-pecl 2006-11-03 13:14:22 UTC (rev 237)
+++ trunk/dh-make-pecl 2007-02-16 21:52:30 UTC (rev 238)
@@ -29,6 +29,7 @@
DEPENDS=
BUILDDEPENDS=
DEPARCH=any
+DONTUSECONFD=false
PHPVERSIONS="4 5"
@@ -57,6 +58,8 @@
(default is ${DEBTEMPDIR})
--only set PHP major version (4 or 5) to build modules for
(default is both)
+ --dont-use-confd do not create package with ps.ini in conf.d, but modify
+ global php.ini by debconf
eof
}
# }}}
@@ -106,6 +109,9 @@
exit 0
fi
;;
+ --dont-use-confd) # place ini file in conf.d
+ DONTUSECONFD=true;
+ ;;
"")
break
;;
@@ -229,32 +235,43 @@
sed -e "s/##phpdevdepends##/${PHPDEVDEPENDS}/g" \
${DEBTEMPDIR}/control > ${SRCPACKAGEDIR}/debian/control
+if [ "$DONTUSECONFD" = "false" ]; then
+sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
+ ${DEBTEMPDIR}/php.ini > ${SRCPACKAGEDIR}/debian/${PHP_PKG_LOWNAME}.ini
+fi
+
#cp ${DEBTEMPDIR}/control ${SRCPACKAGEDIR}/debian/control
#cp ${DEBTEMPDIR}/templates ${SRCPACKAGEDIR}/debian/templates
-cp -r ${DEBTEMPDIR}/po ${SRCPACKAGEDIR}/debian/po
+if [ "$DONTUSECONFD" = "true" ]; then
+ cp -r ${DEBTEMPDIR}/po ${SRCPACKAGEDIR}/debian/po
+fi
# Generate templates specific to php[4|5]-(module) binary packages
for PHPVERSION in $PHPVERSIONS
do
BINPREFIX=${DEBPACKAGEPREFIX}${PHPVERSION}
BINPACKAGE=${BINPREFIX}-${PHP_PKG_LOWNAME}
- sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
- -e "s/##phpversion##/${PHPVERSION}/g" \
- ${DEBTEMPDIR}/postinst > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.postinst
- chmod 755 ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.postinst
+ if [ "$DONTUSECONFD" = "true" ]; then
+ sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
+ -e "s/##phpversion##/${PHPVERSION}/g" \
+ ${DEBTEMPDIR}/postinst > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.postinst
+ chmod 755 ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.postinst
- sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
- -e "s/##phpversion##/${PHPVERSION}/g" \
- ${DEBTEMPDIR}/prerm > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.prerm
- chmod 755 ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.prerm
+ sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
+ -e "s/##phpversion##/${PHPVERSION}/g" \
+ ${DEBTEMPDIR}/prerm > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.prerm
+ chmod 755 ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.prerm
+ fi
sed -e "s/##phpversion##/${PHPVERSION}/g" \
${DEBTEMPDIR}/dirs > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.dirs
- sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
- -e "s/##phpversion##/${PHPVERSION}/g" \
- ${DEBTEMPDIR}/config > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.config
- chmod 755 ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.config
+ if [ "$DONTUSECONFD" = "true" ]; then
+ sed -e "s/##peclpackagename##/${PHP_PKG_LOWNAME}/g" \
+ -e "s/##phpversion##/${PHPVERSION}/g" \
+ ${DEBTEMPDIR}/config > ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.config
+ chmod 755 ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.config
+ fi
sed -e "s/##phpversion##/${PHPVERSION}/g" \
-e "s/##lowpackage##/${PHP_PKG_LOWNAME}/g" \
@@ -271,7 +288,9 @@
echo "" >> ${SRCPACKAGEDIR}/debian/control
echo "" >> ${SRCPACKAGEDIR}/debian/control
- cp ${DEBTEMPDIR}/templates ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.templates
+ if [ "$DONTUSECONFD" = "true" ]; then
+ cp ${DEBTEMPDIR}/templates ${SRCPACKAGEDIR}/debian/${BINPACKAGE}.templates
+ fi
done
Modified: trunk/pecl.template/rules
===================================================================
--- trunk/pecl.template/rules 2006-11-03 13:14:22 UTC (rev 237)
+++ trunk/pecl.template/rules 2007-02-16 21:52:30 UTC (rev 238)
@@ -92,6 +92,10 @@
# chmod 644 debian/$(PACKAGE_NAME)/usr/lib/php4/$$VERSION/*.so'
mkdir -p debian/$(BIN_PACKAGE_NAME)/$(EXT_DIR)
install -m 644 -o root -g root $(SOURCE_DIR)/modules/$(PECL_PKG_NAME).so debian/$(BIN_PACKAGE_NAME)/$(EXT_DIR)/$(PECL_PKG_NAME).so
+ if [ -f "debian/$(PECL_PKG_NAME).ini" ]; then \
+ mkdir -p debian/$(BIN_PACKAGE_NAME)/etc/php$*/conf.d; \
+ cp debian/$(PECL_PKG_NAME).ini debian/$(BIN_PACKAGE_NAME)/etc/php$*/conf.d; \
+ fi
# Build architecture-independent files here.
binary-indep:
More information about the Dh-make-php-commits
mailing list