summaryrefslogtreecommitdiff
path: root/mail/squirrelmail
diff options
context:
space:
mode:
authorjlam <jlam>2001-02-12 15:15:43 +0000
committerjlam <jlam>2001-02-12 15:15:43 +0000
commitc82367f14405bf6c4bb6e5c106e09fb7866293a5 (patch)
treee016836a866dea08fc13d9699f006a73506a4d8f /mail/squirrelmail
parentb509e8e969cb71d0b9e9977e35fcce383668e050 (diff)
downloadpkgsrc-c82367f14405bf6c4bb6e5c106e09fb7866293a5.tar.gz
Add a file for easy inclusion into Apache's httpd.conf file.
Reword MESSAGE to refer to this new file.
Diffstat (limited to 'mail/squirrelmail')
-rw-r--r--mail/squirrelmail/Makefile17
-rw-r--r--mail/squirrelmail/files/squirrelmail.conf.dist14
-rw-r--r--mail/squirrelmail/pkg/DEINSTALL20
-rw-r--r--mail/squirrelmail/pkg/INSTALL20
-rw-r--r--mail/squirrelmail/pkg/MESSAGE13
-rw-r--r--mail/squirrelmail/pkg/PLIST5
6 files changed, 62 insertions, 27 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile
index 2f76daf6acf..1ed1114d70c 100644
--- a/mail/squirrelmail/Makefile
+++ b/mail/squirrelmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2001/02/11 03:41:23 jlam Exp $
+# $NetBSD: Makefile,v 1.6 2001/02/12 15:15:43 jlam Exp $
DISTNAME= squirrelmail-1.0.2
CATEGORIES= mail www
@@ -19,8 +19,8 @@ NO_BUILD= # defined
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
INSTALL_FILE= ${WRKDIR}/INSTALL
-SM_SUBDIR= share/squirrelmail
-SMDIR= ${PREFIX}/${SM_SUBDIR}
+CONFDIR= ${PREFIX}/etc/httpd
+SMDIR= ${PREFIX}/share/squirrelmail
MESSAGE_SUBST+= SMDIR=${SMDIR}
post-extract:
@@ -35,13 +35,16 @@ post-patch:
${FIND} ${WRKSRC} -name "*.orig" -exec ${RM} -f {} \;
pre-install:
- ${SED} -e "s|@SM_SUBDIR@|${SM_SUBDIR}|g" \
+ ${SED} -e "s|@SMDIR@|${SMDIR}|g" \
+ ${FILESDIR}/squirrelmail.conf.dist \
+ > ${WRKDIR}/squirrelmail.conf.dist
+ ${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|@SM_SUBDIR@|${SM_SUBDIR}|g" \
+ ${SED} -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|g" \
-e "s|@CAT@|${CAT}|g" \
-e "s|@CHGRP@|${CHGRP}|g" \
-e "s|@CHMOD@|${CHMOD}|g" \
@@ -52,9 +55,11 @@ pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
do-install:
- ${MKDIR} ${SMDIR}
+ ${INSTALL_DATA_DIR} ${CONFDIR} ${SMDIR}
+ cd ${WRKDIR}; ${INSTALL_DATA} squirrelmail.conf.dist ${CONFDIR}
${CP} -R ${WRKSRC}/* ${SMDIR}
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${SMDIR}
+ ${CHMOD} -R a-w ${SMDIR}
post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
diff --git a/mail/squirrelmail/files/squirrelmail.conf.dist b/mail/squirrelmail/files/squirrelmail.conf.dist
new file mode 100644
index 00000000000..0948a8739e8
--- /dev/null
+++ b/mail/squirrelmail/files/squirrelmail.conf.dist
@@ -0,0 +1,14 @@
+# $NetBSD: squirrelmail.conf.dist,v 1.1 2001/02/12 15:15:44 jlam Exp $
+#
+# SquirrelMail configuration file fragment for Apache
+
+<IfModule mod_alias.c>
+ Alias /mail/ "@SMDIR@/"
+</IfModule>
+
+<Directory "@SMDIR@">
+ Options Indexes MultiViews
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/mail/squirrelmail/pkg/DEINSTALL b/mail/squirrelmail/pkg/DEINSTALL
index 6c2605fe3f0..4e2e3865a93 100644
--- a/mail/squirrelmail/pkg/DEINSTALL
+++ b/mail/squirrelmail/pkg/DEINSTALL
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: DEINSTALL,v 1.1.1.1 2001/01/24 22:44:13 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.2 2001/02/12 15:15:44 jlam Exp $
PKGNAME=$1
STAGE=$2
@@ -10,9 +10,9 @@ RM="@RM@"
RMDIR="@RMDIR@"
TRUE="@TRUE@"
+CONFDIR=${PKG_PREFIX}/etc/httpd
DATADIR=/var/spool/squirrelmail
-SMDIR=${PKG_PREFIX}/@SM_SUBDIR@
-CONFDIR=${SMDIR}/config
+SMDIR=${PKG_PREFIX}/@SMDIR@
CONFFILES="config.php"
case ${STAGE} in
@@ -26,11 +26,20 @@ DEINSTALL)
then
${RM} -f ${FILE}
fi
+ FILE=${CONFDIR}/squirrelmail.conf
+ SAMPLEFILE=${FILE}.dist
+ if diff -q ${FILE} ${SAMPLEFILE} >/dev/null
+ then
+ ${RM} -f ${FILE}
+ fi
;;
POST-DEINSTALL)
modified_files=''
- for FILE in ${CONFDIR}/config.php ${DATADIR}/data/default_pref
+ for FILE in \
+ ${SMDIR}/config/config.php \
+ ${DATADIR}/data/default_pref \
+ ${CONFDIR}/squirrelmail.conf
do
if [ -f ${FILE} ]
then
@@ -38,11 +47,12 @@ POST-DEINSTALL)
fi
done
- ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE}
+ ${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}
diff --git a/mail/squirrelmail/pkg/INSTALL b/mail/squirrelmail/pkg/INSTALL
index 6ccecc26790..8affb36457a 100644
--- a/mail/squirrelmail/pkg/INSTALL
+++ b/mail/squirrelmail/pkg/INSTALL
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: INSTALL,v 1.1.1.1 2001/01/24 22:44:13 jlam Exp $
+# $NetBSD: INSTALL,v 1.2 2001/02/12 15:15:44 jlam Exp $
PKGNAME=$1
STAGE=$2
@@ -15,7 +15,8 @@ MKDIR="@MKDIR@"
USER=nobody
GROUP=nobody
-SMDIR=${PKG_PREFIX}/@SM_SUBDIR@
+CONFDIR=${PKG_PREFIX}/etc/httpd
+SMDIR=${PKG_PREFIX}/@SMDIR@
DATADIR=/var/spool/squirrelmail
case ${STAGE} in
@@ -41,6 +42,16 @@ POST-INSTALL)
${CP} ${SAMPLEFILE} ${FILE}
${CHMOD} 644 ${FILE}
fi
+ FILE=${CONFDIR}/squirrelmail.conf
+ SAMPLEFILE=${FILE}.dist
+ if [ -f ${FILE} ]
+ then
+ echo " ${FILE} already exists"
+ else
+ echo " ${FILE}"
+ ${CP} ${SAMPLEFILE} ${FILE}
+ ${CHMOD} 644 ${FILE}
+ fi
${CAT} << EOF
===========================================================================
@@ -48,7 +59,10 @@ Please run the SquirrelMail configuration script:
cd ${SMDIR}/config && ./conf.pl
-to customize the SquirrelMail webmail system for your site.
+to customize the SquirrelMail webmail system for your site. You may also
+wish to customize:
+
+ ${CONFDIR}/squirrelmail.conf
===========================================================================
EOF
;;
diff --git a/mail/squirrelmail/pkg/MESSAGE b/mail/squirrelmail/pkg/MESSAGE
index fc7a7da7a25..621baf68a7c 100644
--- a/mail/squirrelmail/pkg/MESSAGE
+++ b/mail/squirrelmail/pkg/MESSAGE
@@ -1,21 +1,14 @@
==========================================================================
-$NetBSD: MESSAGE,v 1.3 2001/02/02 19:39:20 jlam Exp $
+$NetBSD: MESSAGE,v 1.4 2001/02/12 15:15:44 jlam Exp $
You will need to make SquirrelMail accessible through your HTTP server.
If you are running Apache and ap-php, then you may either symlink
${SMDIR}
-into DocumentRoot, or add the following lines to httpd.conf:
+into DocumentRoot, or add the following line to httpd.conf:
- Alias /mail/ "${SMDIR}/"
-
- <Directory "${SMDIR}/">
- Options Indexes MultiViews
- AllowOverride None
- Order allow,deny
- Allow from all
- </Directory>
+ Include ${PREFIX}/etc/httpd/squirrelmail.conf
to make IMAP accounts accessible through:
diff --git a/mail/squirrelmail/pkg/PLIST b/mail/squirrelmail/pkg/PLIST
index e75eb0c2056..8b971e27a80 100644
--- a/mail/squirrelmail/pkg/PLIST
+++ b/mail/squirrelmail/pkg/PLIST
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.4 2001/02/11 03:41:23 jlam Exp $
+@comment $NetBSD: PLIST,v 1.5 2001/02/12 15:15:44 jlam Exp $
+etc/httpd/squirrelmail.conf.dist
share/squirrelmail/AUTHORS
share/squirrelmail/COPYING
share/squirrelmail/ChangeLog
@@ -270,5 +271,3 @@ share/squirrelmail/themes/slashdot_theme.php
@dirrm share/squirrelmail/functions
@dirrm share/squirrelmail/doc
@dirrm share/squirrelmail/data
-@unexec rmdir %D/share/squirrelmail/config 2>/dev/null || true
-@unexec rmdir %D/share/squirrelmail 2>/dev/null || true