[Dh-make-php-commits] r199 - trunk
Uwe Steinmann
steinm at costa.debian.org
Fri Jun 2 12:07:25 UTC 2006
Author: steinm
Date: 2006-06-02 12:07:25 +0000 (Fri, 02 Jun 2006)
New Revision: 199
Modified:
trunk/dh-make-php.lib
Log:
- initial support for verion 2.0 of the package.xml file
- copy all documentation declared as 'doc' in package.xml into
the debian package. Same for tests.
Modified: trunk/dh-make-php.lib
===================================================================
--- trunk/dh-make-php.lib 2006-06-01 18:50:56 UTC (rev 198)
+++ trunk/dh-make-php.lib 2006-06-02 12:07:25 UTC (rev 199)
@@ -1,5 +1,9 @@
#!/bin/sh
+get_packageversion() {
+ PACKAGEVERSION=$(xmlstarlet sel -t -m "/package" -v "@version" package.xml)
+}
+
get_zendapi() {
ZENDAPI=$(egrep "#define ZEND_MODULE_API_NO" /usr/include/php4/Zend/zend_modules.h | sed "s/#define ZEND_MODULE_API_NO //")
}
@@ -51,8 +55,8 @@
install_docfiles() {
for i in ${PACKAGEDOCFILES}; do
- if [ -f ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/$i ] ; then
- chmod 644 ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/$i
+ if [ -f ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/${PHP_PKG_NAME}-${VERSION}/$i ] ; then
+# chmod 644 ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/$i
echo $i >> ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/debian/docs
fi
done
@@ -60,26 +64,35 @@
install_expfiles() {
for i in ${PACKAGEEXPFILES}; do
- if [ -d ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/$i ] ; then
+ if [ -d ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/${PHP_PKG_NAME}-${VERSION}/$i ] ; then
echo "$i/*" >> ${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}-${VERSION}/debian/examples
fi
done
}
eval_package() {
- VERSION=$(xsltproc --nonet --novalid --param Element "/package/release/version" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml)
- LICENSE=$(xsltproc --nonet --novalid --param Element "/package/release/license" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml)
+ if [ "${PACKAGEVERSION}" = "2.0" ] ; then
+ echo "lajdflaljfa"
+ VERSION=$(xmlstarlet sel -t -v "/package/version/release" package.xml)
+ LICENSE=$(xmlstarlet sel -t -v "/package/license" package.xml)
+ UPSTREAM=$(xsltproc --nonet --novalid ${PREFIX}/share/dh-make-php/xslt/maintainers-2.0.xsl package.xml | sed -e 's/; $//g')
+ PACKAGEDOCFILES=$(xmlstarlet sel -t -m "/package/contents/*/file[@role='doc']" -v "@name" -o " " package.xml | sed -e 's# examples/[^ ]*##g' -e 's#^examples/[^ ]*##g')
+ PACKAGETESTFILES=$(xmlstarlet sel -t -m "/package/contents/*/file[@role='test']" -v "@name" -o " " package.xml | sed -e 's# examples/[^ ]*##g' -e 's#^examples/[^ ]*##g')
+ else
+ VERSION=$(xsltproc --nonet --novalid --param Element "/package/release/version" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml)
+ LICENSE=$(xsltproc --nonet --novalid --param Element "/package/release/license" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml)
+ UPSTREAM=$(xsltproc --nonet --novalid ${PREFIX}/share/dh-make-php/xslt/maintainers.xsl package.xml | sed -e 's/; $//g')
+ PACKAGEDOCFILES=$(xsltproc --nonet --novalid --stringparam filetype doc ${PREFIX}/share/dh-make-php/xslt/filelist.xsl package.xml | sed -e 's# examples/[^ ]*##g' -e 's#^examples/[^ ]*##g')
+ PACKAGETESTFILES=$(xsltproc --nonet --novalid --stringparam filetype test ${PREFIX}/share/dh-make-php/xslt/filelist.xsl package.xml)
+ fi
LOWLICENSE=$(echo $LICENSE | awk '{print tolower($0)}' | sed 's/ /-/g')
if [ -f "${PREFIX}/share/dh-make-php/licenses/${LOWLICENSE}" ]; then
LICENSEFILE=${PREFIX}/share/dh-make-php/licenses/${LOWLICENSE}
fi
PHP_PKG_NAME=$(xsltproc --nonet --novalid --param Element "/package/name" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml)
PHP_PKG_LOWNAME=$(echo $PHP_PKG_NAME | awk '{print tolower($0)}' | sed 's/_/-/g')
- UPSTREAM=$(xsltproc --nonet --novalid ${PREFIX}/share/dh-make-php/xslt/maintainers.xsl package.xml | sed -e 's/; $//g')
SUMMARY=$(xsltproc --nonet --novalid --param Element "/package/summary" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml)
DESCRIPTION=$(xsltproc --nonet --novalid --param Element "/package/description" ${PREFIX}/share/dh-make-php/xslt/common.xsl package.xml|fold -s -w60)
- PACKAGEDOCFILES=$(xsltproc --nonet --novalid --stringparam filetype doc ${PREFIX}/share/dh-make-php/xslt/filelist.xsl package.xml | sed -e 's# examples/[^ ]*##g' -e 's#^examples/[^ ]*##g')
- PACKAGETESTFILES=$(xsltproc --nonet --novalid --stringparam filetype test ${PREFIX}/share/dh-make-php/xslt/filelist.xsl package.xml)
}
# vim: syntax=sh
More information about the Dh-make-php-commits
mailing list