diff options
author | jlam <jlam> | 2001-11-19 16:23:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-11-19 16:23:08 +0000 |
commit | 921dba3e4056acfac3df83e1629ab22167889846 (patch) | |
tree | d5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /mail | |
parent | e740603fc9e2110613fe030c8dabf0543d664a81 (diff) | |
download | pkgsrc-921dba3e4056acfac3df83e1629ab22167889846.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')
-rw-r--r-- | mail/imp/DEINSTALL | 117 | ||||
-rw-r--r-- | mail/imp/INSTALL | 79 | ||||
-rw-r--r-- | mail/imp/Makefile | 56 | ||||
-rw-r--r-- | mail/sq-squirrelspell/DEINSTALL | 94 | ||||
-rw-r--r-- | mail/sq-squirrelspell/INSTALL | 47 | ||||
-rw-r--r-- | mail/sq-squirrelspell/Makefile | 21 | ||||
-rw-r--r-- | mail/squirrelmail/DEINSTALL | 110 | ||||
-rw-r--r-- | mail/squirrelmail/INSTALL | 77 | ||||
-rw-r--r-- | mail/squirrelmail/MESSAGE | 8 | ||||
-rw-r--r-- | mail/squirrelmail/Makefile | 36 |
10 files changed, 61 insertions, 584 deletions
diff --git a/mail/imp/DEINSTALL b/mail/imp/DEINSTALL deleted file mode 100644 index 637f7db0914..00000000000 --- a/mail/imp/DEINSTALL +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh -# -# $NetBSD: DEINSTALL,v 1.1 2001/11/01 01:00:16 zuntum Exp $ - -PKGNAME=$1 -STAGE=$2 - -CAT="@CAT@" -CMP="@CMP@" -RM="@RM@" -RMDIR="@RMDIR@" -TRUE="@TRUE@" - -APACHE_SYSCONFDIR="@APACHE_SYSCONFDIR@" -SAMPLECONFDIR=${PKG_PREFIX}/share/examples/imp -CONFDIR=${APACHE_SYSCONFDIR} -IMPDIR=${PKG_PREFIX}/@IMPDIR@ - -CONFFILES=" ${IMPDIR}/config/defaults.php3 \ - ${IMPDIR}/config/ldap.php3 \ - ${IMPDIR}/config/servers.php3" -NONCONFFILES=" ${IMPDIR}/config/MOTD.html \ - ${IMPDIR}/config/header.txt \ - ${IMPDIR}/config/html.php3 \ - ${IMPDIR}/config/imp_module_config.php3 \ - ${IMPDIR}/config/lang.php3 \ - ${IMPDIR}/config/mailbox.php3 \ - ${IMPDIR}/config/menu.txt \ - ${IMPDIR}/config/mime.php3 \ - ${IMPDIR}/config/trailer.txt" - -case ${STAGE} in -DEINSTALL) - # Remove configuration files if they don't differ from the default - # config file. - # - FILE=${CONFDIR}/imp.conf - SAMPLEFILE=${SAMPLECONFDIR}/imp.conf - if ${CMP} -s ${FILE} ${SAMPLEFILE} - then - ${RM} -f ${FILE} - fi - for FILE in ${CONFFILES} ${NONCONFFILES} - do - SAMPLEFILE=${FILE}.dist - if ${CMP} -s ${FILE} ${SAMPLEFILE} - then - ${RM} -f ${FILE} - fi - done - ;; - -POST-DEINSTALL) - modified_files='' - for FILE in ${CONFDIR}/imp.conf ${CONFFILES} ${NONCONFFILES} - do - if [ -f ${FILE} ] - then - modified_files="${modified_files} ${FILE}" - fi - done - - ${RMDIR} ${IMPDIR}/config 2>/dev/null || ${TRUE} - ${RMDIR} ${IMPDIR} 2>/dev/null || ${TRUE} - ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE} - - existing_dirs='' - for dir in ${IMPDIR} - 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/imp/INSTALL b/mail/imp/INSTALL deleted file mode 100644 index 59d56707c9c..00000000000 --- a/mail/imp/INSTALL +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh -# -# $NetBSD: INSTALL,v 1.1 2001/11/01 01:00:17 zuntum Exp $ - -PKGNAME=$1 -STAGE=$2 - -CAT="@CAT@" -CHMOD="@CHMOD@" -CP="@CP@" - -APACHE_SYSCONFDIR="@APACHE_SYSCONFDIR@" -SAMPLECONFDIR=${PKG_PREFIX}/share/examples/imp -CONFDIR=${APACHE_SYSCONFDIR} -IMPDIR=${PKG_PREFIX}/@IMPDIR@ - -CONFFILES=" ${IMPDIR}/config/defaults.php3 \ - ${IMPDIR}/config/ldap.php3 \ - ${IMPDIR}/config/servers.php3" -NONCONFFILES=" ${IMPDIR}/config/MOTD.html \ - ${IMPDIR}/config/header.txt \ - ${IMPDIR}/config/html.php3 \ - ${IMPDIR}/config/imp_module_config.php3 \ - ${IMPDIR}/config/lang.php3 \ - ${IMPDIR}/config/mailbox.php3 \ - ${IMPDIR}/config/menu.txt \ - ${IMPDIR}/config/mime.php3 \ - ${IMPDIR}/config/prefs.php3 \ - ${IMPDIR}/config/trailer.txt" - -case ${STAGE} in -PRE-INSTALL) - ;; - -POST-INSTALL) - echo "Installing configuration files:" - FILE=${CONFDIR}/imp.conf - SAMPLEFILE=${SAMPLECONFDIR}/imp.conf - if [ -f ${FILE} ] - then - echo " ${FILE} already exists" - else - echo " ${FILE}" - ${CP} ${SAMPLEFILE} ${FILE} - ${CHMOD} 644 ${FILE} - fi - for FILE in ${CONFFILES} ${NONCONFFILES} - do - SAMPLEFILE=${FILE}.dist - if [ -f ${FILE} ] - then - echo " ${FILE} already exists" - else - echo " ${FILE}" - ${CP} ${SAMPLEFILE} ${FILE} - ${CHMOD} 644 ${FILE} - fi - done - ${CAT} << EOF - -=========================================================================== -Some files you might need to customize include the following: - -EOF - for FILE in ${CONFFILES} - do - echo " ${FILE}" - done - ${CAT} << EOF -=========================================================================== -EOF - ;; - -*) - echo "Unexpected argument: ${STAGE}" - exit 1 - ;; -esac -exit 0 diff --git a/mail/imp/Makefile b/mail/imp/Makefile index 6f2d15982e8..da6608f1102 100644 --- a/mail/imp/Makefile +++ b/mail/imp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2001/11/11 19:29:10 bouyer Exp $ +# $NetBSD: Makefile,v 1.14 2001/11/19 16:23:10 jlam Exp $ DISTNAME= imp-2.2.7 CATEGORIES= mail www @@ -11,11 +11,6 @@ COMMENT= Internet Messaging Program DEPENDS+= horde-1.2.7:../../www/horde DEPENDS+= php-imap>3.0.17:../../mail/php4-imap -NO_CONFIGURE= # defined - -DEINSTALL_FILE= ${WRKDIR}/DEINSTALL -INSTALL_FILE= ${WRKDIR}/INSTALL - DOCDIR= ${PREFIX}/share/doc/imp EGDIR= ${PREFIX}/share/examples/imp HORDEDIR= ${PREFIX}/share/horde @@ -25,26 +20,44 @@ MESSAGE_SUBST+= IMPDIR=${IMPDIR} .include "../../mk/bsd.prefs.mk" -APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd +APACHE_SYSCONFDIR?= ${CONFDIR}/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!@/} +CONF_FILES= ${EGDIR}/imp.conf ${APACHE_SYSCONFDIR}/imp.conf +CONF_FILES+= ${IMPDIR}/config/defaults.php3.dist \ + ${IMPDIR}/config/defaults.php3 +CONF_FILES+= ${IMPDIR}/config/ldap.php3.dist \ + ${IMPDIR}/config/ldap.php3 +CONF_FILES+= ${IMPDIR}/config/servers.php3.dist \ + ${IMPDIR}/config/servers.php3 +SUPPORT_FILES+= ${IMPDIR}/config/MOTD.html.dist \ + ${IMPDIR}/config/MOTD.html +SUPPORT_FILES+= ${IMPDIR}/config/header.txt.dist \ + ${IMPDIR}/config/header.txt +SUPPORT_FILES+= ${IMPDIR}/config/html.php3.dist \ + ${IMPDIR}/config/html.php3 +SUPPORT_FILES+= ${IMPDIR}/config/imp_module_config.php3.dist \ + ${IMPDIR}/config/imp_module_config.php3 +SUPPORT_FILES+= ${IMPDIR}/config/lang.php3.dist \ + ${IMPDIR}/config/lang.php3 +SUPPORT_FILES+= ${IMPDIR}/config/mailbox.php3.dist \ + ${IMPDIR}/config/mailbox.php3 +SUPPORT_FILES+= ${IMPDIR}/config/menu.txt.dist \ + ${IMPDIR}/config/menu.txt +SUPPORT_FILES+= ${IMPDIR}/config/mime.php3.dist \ + ${IMPDIR}/config/mime.php3 +SUPPORT_FILES+= ${IMPDIR}/config/prefs.php3.dist \ + ${IMPDIR}/config/prefs.php3 +SUPPORT_FILES+= ${IMPDIR}/config/trailer.txt.dist \ + ${IMPDIR}/config/trailer.txt +MAKE_DIRS= ${APACHE_SYSCONFDIR} post-extract: - cd ${WRKSRC}; \ + cd ${WRKSRC}; \ for file in \ - config/MOTD.html config/header.txt config/html.php3 \ - config/imp_module_config.php3 config/lang.php3 \ + config/MOTD.html config/header.txt config/html.php3 \ + config/imp_module_config.php3 config/lang.php3 \ config/mailbox.php3 config/menu.txt config/trailer.txt ; \ do \ ${MV} $${file} $${file}.dist; \ @@ -77,8 +90,6 @@ do-build: pre-install: ${SED} -e "s|@IMPDIR@|${IMPDIR}|g" \ ${FILESDIR}/imp.conf.dist > ${WRKDIR}/imp.conf.dist - ${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: @@ -95,4 +106,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" 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" diff --git a/mail/squirrelmail/DEINSTALL b/mail/squirrelmail/DEINSTALL deleted file mode 100644 index 350b6d3cfba..00000000000 --- a/mail/squirrelmail/DEINSTALL +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh -# -# $NetBSD: DEINSTALL,v 1.1 2001/11/01 01:01:30 zuntum Exp $ - -PKGNAME=$1 -STAGE=$2 - -CAT="@CAT@" -CMP="@CMP@" -RM="@RM@" -RMDIR="@RMDIR@" -TRUE="@TRUE@" - -APACHE_SYSCONFDIR=@APACHE_SYSCONFDIR@ -SAMPLECONFDIR=${PKG_PREFIX}/share/examples/squirrelmail -CONFDIR=${APACHE_SYSCONFDIR} -DATADIR=/var/spool/squirrelmail -SMDIR=${PKG_PREFIX}/@SMDIR@ -CONFFILES="config.php" - -case ${STAGE} in -DEINSTALL) - # Remove configuration files if they don't differ from the default - # config file. - # - FILE=${DATADIR}/data/default_pref - SAMPLEFILE=${SMDIR}/data/default_pref - if ${CMP} -s ${FILE} ${SAMPLEFILE} - then - ${RM} -f ${FILE} - fi - FILE=${CONFDIR}/squirrelmail.conf - SAMPLEFILE=${SAMPLECONFDIR}/squirrelmail.conf - if ${CMP} -s ${FILE} ${SAMPLEFILE} - then - ${RM} -f ${FILE} - fi - ;; - -POST-DEINSTALL) - modified_files='' - for FILE in \ - ${SMDIR}/config/config.php \ - ${DATADIR}/data/default_pref \ - ${CONFDIR}/squirrelmail.conf - do - if [ -f ${FILE} ] - then - modified_files="${modified_files} ${FILE}" - fi - done - - ${RMDIR} ${SMDIR}/config 2>/dev/null || ${TRUE} - ${RMDIR} ${SMDIR} 2>/dev/null || ${TRUE} - ${RMDIR} ${DATADIR}/attachments 2>/dev/null || ${TRUE} - ${RMDIR} ${DATADIR}/data 2>/dev/null || ${TRUE} - ${RMDIR} ${DATADIR} 2>/dev/null || ${TRUE} - ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE} - - existing_dirs='' - for dir in ${SMDIR} ${DATADIR} - 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/squirrelmail/INSTALL b/mail/squirrelmail/INSTALL deleted file mode 100644 index b60507aa247..00000000000 --- a/mail/squirrelmail/INSTALL +++ /dev/null @@ -1,77 +0,0 @@ -#! /bin/sh -# -# $NetBSD: INSTALL,v 1.1 2001/11/01 01:01:31 zuntum Exp $ - -PKGNAME=$1 -STAGE=$2 - -CAT="@CAT@" -CHGRP="@CHGRP@" -CHMOD="@CHMOD@" -CHOWN="@CHOWN@" -CP="@CP@" -MKDIR="@MKDIR@" - -USER=nobody -GROUP=nobody - -APACHE_SYSCONFDIR=@APACHE_SYSCONFDIR@ -SAMPLECONFDIR=${PKG_PREFIX}/share/examples/squirrelmail -CONFDIR=${APACHE_SYSCONFDIR} -SMDIR=${PKG_PREFIX}/@SMDIR@ -DATADIR=/var/spool/squirrelmail - -case ${STAGE} in -PRE-INSTALL) - ;; - -POST-INSTALL) - ${MKDIR} ${DATADIR} - ${MKDIR} ${DATADIR}/attachments - ${CHGRP} -R ${GROUP} ${DATADIR}/attachments - ${CHMOD} 730 ${DATADIR}/attachments - ${MKDIR} ${DATADIR}/data - ${CHOWN} -R ${USER}:${GROUP} ${DATADIR}/data - - echo "Installing configuration files:" - FILE=${DATADIR}/data/default_pref - SAMPLEFILE=${SMDIR}/data/default_pref - if [ -f ${FILE} ] - then - echo " ${FILE} already exists" - else - echo " ${FILE}" - ${CP} ${SAMPLEFILE} ${FILE} - ${CHMOD} 644 ${FILE} - fi - FILE=${CONFDIR}/squirrelmail.conf - SAMPLEFILE=${SAMPLECONFDIR}/squirrelmail.conf - if [ -f ${FILE} ] - then - echo " ${FILE} already exists" - else - echo " ${FILE}" - ${CP} ${SAMPLEFILE} ${FILE} - ${CHMOD} 644 ${FILE} - fi - ${CAT} << EOF - -=========================================================================== -Please run the SquirrelMail configuration script: - - cd ${SMDIR}/config && ./conf.pl - -to customize the SquirrelMail webmail system for your site. You may also -wish to customize: - - ${CONFDIR}/squirrelmail.conf -=========================================================================== -EOF - ;; - -*) - echo "Unexpected argument: ${STAGE}" - exit 1 - ;; -esac -exit 0 diff --git a/mail/squirrelmail/MESSAGE b/mail/squirrelmail/MESSAGE index a229cb7630a..6742d3e1df7 100644 --- a/mail/squirrelmail/MESSAGE +++ b/mail/squirrelmail/MESSAGE @@ -1,5 +1,11 @@ ========================================================================== -$NetBSD: MESSAGE,v 1.1 2001/11/01 01:01:31 zuntum Exp $ +$NetBSD: MESSAGE,v 1.2 2001/11/19 16:23:10 jlam Exp $ + +Please run the SquirrelMail configuration script: + + cd ${SMDIR}/config && ./conf.pl + +to customize the SquirrelMail webmail system for your site. You will need to make SquirrelMail accessible through your HTTP server. If you are running Apache and ap-php, then you may either symlink diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index 1beed6d82fd..e94d0225a53 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2001/07/13 07:09:19 jlam Exp $ +# $NetBSD: Makefile,v 1.12 2001/11/19 16:23:10 jlam Exp $ DISTNAME= squirrelmail-1.0.6 CATEGORIES= mail www @@ -19,30 +19,25 @@ NO_BUILD= # defined .include "../../mk/bsd.prefs.mk" -APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd +APACHE_SYSCONFDIR?= ${CONFDIR}/httpd BUILD_DEFS+= APACHE_SYSCONFDIR MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} EGDIR= ${PREFIX}/share/examples/squirrelmail SMDIR= ${PREFIX}/share/squirrelmail +DATADIR= /var/spool/squirrelmail MESSAGE_SUBST+= SMDIR=${SMDIR} +FILES_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!@/} +CONF_FILES= ${SMDIR}/config/config_default.php ${SMDIR}/config/config.php +CONF_FILES+= ${SMDIR}/data/default_pref ${DATADIR}/data/default_pref +CONF_FILES+= ${EGDIR}/squirrelmail.conf ${APACHE_SYSCONFDIR}/squirrelmail.conf +MAKE_DIRS= ${APACHE_SYSCONFDIR} +OWN_DIRS= ${DATADIR} +OWN_DIRS+= ${SMDIR} ${SMDIR}/config +OWN_DIRS_PERMS= ${DATADIR}/attachments root nobody 730 +OWN_DIRS_PERMS+= ${DATADIR}/data nobody nobody 755 post-extract: cd ${WRKSRC}; \ @@ -56,11 +51,9 @@ post-patch: ${FIND} ${WRKSRC} -name "*.orig" -exec ${RM} -f {} \; pre-install: - ${SED} -e "s|@SMDIR@|${SMDIR}|g" \ + ${SED} ${FILES_SUBST_SED} \ ${FILESDIR}/squirrelmail.conf.dist \ > ${WRKDIR}/squirrelmail.conf.dist - ${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: @@ -74,4 +67,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" |