diff options
author | jlam <jlam> | 2001-07-13 07:09:17 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-07-13 07:09:17 +0000 |
commit | 03a6dd6fa68b8924591bf7640f135f0b395084b2 (patch) | |
tree | 6f97936deeb9a539bc07b5007be8c72a20640428 /mail | |
parent | bb13b45fb37e28767db6b8129d33334a3c80e8ed (diff) | |
download | pkgsrc-03a6dd6fa68b8924591bf7640f135f0b395084b2.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 'mail')
-rw-r--r-- | mail/imp/Makefile | 34 | ||||
-rw-r--r-- | mail/imp/pkg/DEINSTALL | 7 | ||||
-rw-r--r-- | mail/mutt-devel/Makefile | 3 | ||||
-rw-r--r-- | mail/mutt-devel/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | mail/mutt/Makefile | 3 | ||||
-rw-r--r-- | mail/mutt/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | mail/sq-squirrelspell/Makefile | 25 | ||||
-rw-r--r-- | mail/sq-squirrelspell/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | mail/squirrelmail/Makefile | 34 | ||||
-rw-r--r-- | mail/squirrelmail/pkg/DEINSTALL | 7 |
10 files changed, 68 insertions, 60 deletions
diff --git a/mail/imp/Makefile b/mail/imp/Makefile index f8247d6bf09..d12fc021661 100644 --- a/mail/imp/Makefile +++ b/mail/imp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/05/22 21:12:20 jlam Exp $ +# $NetBSD: Makefile,v 1.8 2001/07/13 07:09:17 jlam Exp $ DISTNAME= imp-2.2.5 CATEGORIES= mail www @@ -29,6 +29,17 @@ APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd BUILD_DEFS+= APACHE_SYSCONFDIR MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST= IMPDIR=${IMPDIR: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}/config; \ for file in \ @@ -58,26 +69,15 @@ post-patch: done do-build: - ${FIND} ${WRKSRC} -name "*.orig" -exec ${RM} -f {} \; - ${FIND} ${WRKSRC} -name "*.pl" -exec ${CHMOD} +x {} \; - ${FIND} ${WRKSRC} -name "*.sh" -exec ${CHMOD} +x {} \; + ${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f + ${FIND} ${WRKSRC} -name "*.pl" -print | ${XARGS} ${CHMOD} +x + ${FIND} ${WRKSRC} -name "*.sh" -print | ${XARGS} ${CHMOD} +x pre-install: ${SED} -e "s|@IMPDIR@|${IMPDIR}|g" \ ${FILESDIR}/imp.conf.dist > ${WRKDIR}/imp.conf.dist - ${SED} -e "s|@IMPDIR@|${IMPDIR: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|@IMPDIR@|${IMPDIR: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/mail/imp/pkg/DEINSTALL b/mail/imp/pkg/DEINSTALL index b885189ef4a..6c0f23c4357 100644 --- a/mail/imp/pkg/DEINSTALL +++ b/mail/imp/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/04/30 06:11:09 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:18 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -36,14 +37,14 @@ DEINSTALL) # FILE=${CONFDIR}/imp.conf SAMPLEFILE=${SAMPLECONFDIR}/imp.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 diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile index 1c1ed15048d..7404836d9fc 100644 --- a/mail/mutt-devel/Makefile +++ b/mail/mutt-devel/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2001/06/30 14:49:57 jlam Exp $ +# $NetBSD: Makefile,v 1.7 2001/07/13 07:09:18 jlam Exp $ DISTNAME= mutt-1.3.18i CATEGORIES= mail @@ -50,6 +50,7 @@ INSTALL_FILE= ${WRKDIR}/INSTALL 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!@/} diff --git a/mail/mutt-devel/pkg/DEINSTALL b/mail/mutt-devel/pkg/DEINSTALL index e9c0723d52f..4d9006a73b1 100644 --- a/mail/mutt-devel/pkg/DEINSTALL +++ b/mail/mutt-devel/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/07/12 06:05:29 tron Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:18 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/doc/mutt/samples @@ -22,7 +23,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if cmp -s ${FILE} ${SAMPLEFILE} + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile index becd21154f4..90895ed137d 100644 --- a/mail/mutt/Makefile +++ b/mail/mutt/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.73 2001/06/20 07:31:58 jlam Exp $ +# $NetBSD: Makefile,v 1.74 2001/07/13 07:09:18 jlam Exp $ DISTNAME= mutt-1.2.5i CATEGORIES= mail @@ -50,6 +50,7 @@ INSTALL_FILE= ${WRKDIR}/INSTALL 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!@/} diff --git a/mail/mutt/pkg/DEINSTALL b/mail/mutt/pkg/DEINSTALL index 357c47e1754..1a58deb6a5f 100644 --- a/mail/mutt/pkg/DEINSTALL +++ b/mail/mutt/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/07/12 06:05:28 tron Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:19 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/doc/mutt/samples @@ -22,7 +23,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if cmp -s ${FILE} ${SAMPLEFILE} + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/mail/sq-squirrelspell/Makefile b/mail/sq-squirrelspell/Makefile index 75b1799d09a..2b42c02c68f 100644 --- a/mail/sq-squirrelspell/Makefile +++ b/mail/sq-squirrelspell/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2001/05/16 08:08:41 jlam Exp $ +# $NetBSD: Makefile,v 1.3 2001/07/13 07:09:19 jlam Exp $ DISTNAME= squirrelspell.0.3.5-1.0.6 PKGNAME= sq-squirrelspell-0.3.5 @@ -23,18 +23,19 @@ NO_BUILD= # defined DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= SMDIR=${SMDIR:S/^${PREFIX}\///} +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!@/} + pre-install: - ${SED} -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|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|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|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/mail/sq-squirrelspell/pkg/DEINSTALL b/mail/sq-squirrelspell/pkg/DEINSTALL index 69ea198f63e..f030fa455d4 100644 --- a/mail/sq-squirrelspell/pkg/DEINSTALL +++ b/mail/sq-squirrelspell/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1.1.1 2001/05/16 07:57:24 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:19 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -21,7 +22,7 @@ DEINSTALL) # FILE=${CONFDIR}/sqspell_config.php SAMPLEFILE=${CONFDIR}/sqspell_config.dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index c8fe06ae65b..1beed6d82fd 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2001/04/30 05:35:45 jlam Exp $ +# $NetBSD: Makefile,v 1.11 2001/07/13 07:09:19 jlam Exp $ DISTNAME= squirrelmail-1.0.6 CATEGORIES= mail www @@ -30,6 +30,20 @@ MESSAGE_SUBST+= SMDIR=${SMDIR} DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= SMDIR=${SMDIR:S/^${PREFIX}\///} +FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHGRP=${CHGRP:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CHOWN=${CHOWN:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= MKDIR=${MKDIR: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}; \ ${MV} config/conf.pl config/conf.pl.orig; \ @@ -45,22 +59,8 @@ pre-install: ${SED} -e "s|@SMDIR@|${SMDIR}|g" \ ${FILESDIR}/squirrelmail.conf.dist \ > ${WRKDIR}/squirrelmail.conf.dist - ${SED} -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|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|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHGRP@|${CHGRP}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CHOWN@|${CHOWN}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@MKDIR@|${MKDIR}|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/mail/squirrelmail/pkg/DEINSTALL b/mail/squirrelmail/pkg/DEINSTALL index b0fe12e08c2..fb5679fd32f 100644 --- a/mail/squirrelmail/pkg/DEINSTALL +++ b/mail/squirrelmail/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.4 2001/04/30 05:35:45 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.5 2001/07/13 07:09:20 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -24,13 +25,13 @@ DEINSTALL) # FILE=${DATADIR}/data/default_pref SAMPLEFILE=${SMDIR}/data/default_pref - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi FILE=${CONFDIR}/squirrelmail.conf SAMPLEFILE=${SAMPLECONFDIR}/squirrelmail.conf - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi |