summaryrefslogtreecommitdiff
path: root/mail/sq-squirrelspell
diff options
context:
space:
mode:
authorjlam <jlam>2001-07-13 07:09:17 +0000
committerjlam <jlam>2001-07-13 07:09:17 +0000
commit9301100af50bc784e0f352cf457e9090fc7b005d (patch)
tree6f97936deeb9a539bc07b5007be8c72a20640428 /mail/sq-squirrelspell
parent1142e8b40d1d1d9f6ce4570b4e17182c30da66e4 (diff)
downloadpkgsrc-9301100af50bc784e0f352cf457e9090fc7b005d.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/sq-squirrelspell')
-rw-r--r--mail/sq-squirrelspell/Makefile25
-rw-r--r--mail/sq-squirrelspell/pkg/DEINSTALL5
2 files changed, 16 insertions, 14 deletions
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