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/horde | |
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/horde')
-rw-r--r-- | www/horde/Makefile | 31 | ||||
-rw-r--r-- | www/horde/pkg/DEINSTALL | 7 |
2 files changed, 19 insertions, 19 deletions
diff --git a/www/horde/Makefile b/www/horde/Makefile index 0bc889d13d0..c2970aa3726 100644 --- a/www/horde/Makefile +++ b/www/horde/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/06/07 16:30:49 jlam Exp $ +# $NetBSD: Makefile,v 1.8 2001/07/13 07:09:26 jlam Exp $ DISTNAME= horde-1.2.5 CATEGORIES= www @@ -30,6 +30,18 @@ APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd BUILD_DEFS+= APACHE_SYSCONFDIR MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST= HORDEDIR=${HORDEDIR:S/^${PREFIX}\///} +FILES_SUBST= PHPLIBDIR=${PHPLIBDIR:S/^${PREFIX}\///} +FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +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+= RMDIR=${RMDIR:Q} +FILES_SUBST+= TRUE=${TRUE:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + post-extract: cd ${WRKSRC}/phplib; \ for file in local.inc prepend.php3; do \ @@ -70,21 +82,8 @@ pre-install: ${FILESDIR}/horde_setup.sh > ${WRKDIR}/horde_setup.sh ${SED} -e "s|@HORDEDIR@|${HORDEDIR}|g" \ ${FILESDIR}/horde_secure.sh > ${WRKDIR}/horde_secure.sh - ${SED} -e "s|@HORDEDIR@|${HORDEDIR:S/^${PREFIX}\///}|g" \ - -e "s|@PHPLIBDIR@|${PHPLIBDIR:S/^${PREFIX}\///}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - -e "s|@RMDIR@|${RMDIR}|g" \ - -e "s|@TRUE@|${TRUE}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@HORDEDIR@|${HORDEDIR:S/^${PREFIX}\///}|g" \ - -e "s|@PHPLIBDIR@|${PHPLIBDIR:S/^${PREFIX}\///}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|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 do-install: diff --git a/www/horde/pkg/DEINSTALL b/www/horde/pkg/DEINSTALL index 298f4bb423f..d010e188aea 100644 --- a/www/horde/pkg/DEINSTALL +++ b/www/horde/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/04/30 05:53:29 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:26 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -33,14 +34,14 @@ DEINSTALL) # FILE=${CONFDIR}/horde.conf SAMPLEFILE=${SAMPLECONFDIR}/horde.conf - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi for FILE in ${CONFFILES} ${NONCONFFILES} do SAMPLEFILE=${FILE}.dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi |