diff options
author | jlam <jlam@pkgsrc.org> | 2001-07-13 07:09:17 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-07-13 07:09:17 +0000 |
commit | 9820a22a904f7576bb8724416da2edafe7a03b8e (patch) | |
tree | 6f97936deeb9a539bc07b5007be8c72a20640428 /www/php4 | |
parent | d3bc280f5563750d61a3f8c7dcd95a634e4fda1a (diff) | |
download | pkgsrc-9820a22a904f7576bb8724416da2edafe7a03b8e.tar.gz |
In package Makefiles, create FILES_SUBST instead of duplicating sed
expression for substituting in DEINSTALL/INSTALL scripts. Use "${CMP} -s"
instead of "diff -q" since the former is more portable across OSes.
Diffstat (limited to 'www/php4')
-rw-r--r-- | www/php4/Makefile | 22 | ||||
-rw-r--r-- | www/php4/pkg/DEINSTALL | 5 |
2 files changed, 14 insertions, 13 deletions
diff --git a/www/php4/Makefile b/www/php4/Makefile index b3ecc9ddc00..e2355871afd 100644 --- a/www/php4/Makefile +++ b/www/php4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2001/05/14 14:12:28 jlam Exp $ +# $NetBSD: Makefile,v 1.13 2001/07/13 07:09:26 jlam Exp $ .include "../../www/php4/Makefile.common" @@ -15,17 +15,17 @@ EGDIR= ${PREFIX}/share/examples/php DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= PHP_CONFDIR=${PHP_CONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + pre-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/thttpd - ${SED} -e "s|@PHP_CONFDIR@|${PHP_CONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@PHP_CONFDIR@|${PHP_CONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CP@|${CP}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL post-install: diff --git a/www/php4/pkg/DEINSTALL b/www/php4/pkg/DEINSTALL index 3b5eca1f08c..01d739fa8a2 100644 --- a/www/php4/pkg/DEINSTALL +++ b/www/php4/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/05/14 14:12:30 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:27 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples/php @@ -21,7 +22,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}-dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi |