summaryrefslogtreecommitdiff
path: root/mail/sq-squirrelspell
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-19 16:23:08 +0000
committerjlam <jlam@pkgsrc.org>2001-11-19 16:23:08 +0000
commitb23d2e86260aaa8ed2013bf77ad605b63e34b0ed (patch)
treed5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /mail/sq-squirrelspell
parentc850f81b615ba9e58563fe40c1075ad3aea9ffa4 (diff)
downloadpkgsrc-b23d2e86260aaa8ed2013bf77ad605b63e34b0ed.tar.gz
Adapt to use shared INSTALL/DEINSTALL scripts by using the logic in
bsd.pkg.install.mk: * Remove old DEINSTALL/INSTALL scripts. * Move some text printed at POST-INSTALL time into the MESSAGE file. * Adjust rc.d scripts to respect rc.conf settings, so that the script may be directly copied into /etc/rc.d.
Diffstat (limited to 'mail/sq-squirrelspell')
-rw-r--r--mail/sq-squirrelspell/DEINSTALL94
-rw-r--r--mail/sq-squirrelspell/INSTALL47
-rw-r--r--mail/sq-squirrelspell/Makefile21
3 files changed, 5 insertions, 157 deletions
diff --git a/mail/sq-squirrelspell/DEINSTALL b/mail/sq-squirrelspell/DEINSTALL
deleted file mode 100644
index 2118bb90f42..00000000000
--- a/mail/sq-squirrelspell/DEINSTALL
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 01:01:25 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TRUE="@TRUE@"
-
-SMDIR=${PKG_PREFIX}/@SMDIR@
-CONFDIR=${SMDIR}/plugins/squirrelspell
-SAMPLECONFDIR=${CONFDIR}
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- FILE=${CONFDIR}/sqspell_config.php
- SAMPLEFILE=${CONFDIR}/sqspell_config.dist
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for FILE in \
- ${CONFDIR}/sqspell_config.php
- do
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE}
-
- existing_dirs=''
- for dir in ${CONFDIR}
- do
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
- * the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- echo " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/mail/sq-squirrelspell/INSTALL b/mail/sq-squirrelspell/INSTALL
deleted file mode 100644
index 8f42baf1488..00000000000
--- a/mail/sq-squirrelspell/INSTALL
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 01:01:26 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-
-SMDIR=${PKG_PREFIX}/@SMDIR@
-CONFDIR=${SMDIR}/plugins/squirrelspell
-SAMPLECONFDIR=${CONFDIR}
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- echo "Installing configuration files:"
- FILE=${CONFDIR}/sqspell_config.php
- SAMPLEFILE=${CONFDIR}/sqspell_config.dist
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- ${CAT} << EOF
-
-===========================================================================
-You may wish to customize:
-
- ${CONFDIR}/sqspell_config.php
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/mail/sq-squirrelspell/Makefile b/mail/sq-squirrelspell/Makefile
index ad4b3ee7b9d..c5e6a5d2e75 100644
--- a/mail/sq-squirrelspell/Makefile
+++ b/mail/sq-squirrelspell/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2001/10/29 05:43:47 jmc Exp $
+# $NetBSD: Makefile,v 1.5 2001/11/19 16:23:11 jlam Exp $
DISTNAME= squirrelspell.0.3.5-1.0.6
PKGNAME= sq-squirrelspell-0.3.5
@@ -17,25 +17,13 @@ DEPENDS+= squirrelmail>=1.0.6:../../mail/squirrelmail
SMDIR= ${PREFIX}/share/squirrelmail
MESSAGE_SUBST+= SMDIR=${SMDIR}
-NO_CONFIGURE= # defined
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!@/}
+CONF_FILES= ${SMDIR}/plugins/squirrelspell/sqspell_config.dist \
+ ${SMDIR}/plugins/squirrelspell/sqspell_config.php
+OWN_DIRS= ${SMDIR}/plugins/squirrelspell
pre-install:
- ${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:
@@ -44,4 +32,5 @@ do-install:
post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"