aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2012-09-09 16:29:30 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2012-09-09 16:29:30 +0000
commit774ca7d51af8171af5bef0c9b1462b2d8979df71 (patch)
tree451a95dc45fb1f1add6c9e964c4b5b6a88dc9676 /mail
parentee5571c4ff6eed8914e0c31819e4aeafa531ca85 (diff)
downloadports-774ca7d51af8171af5bef0c9b1462b2d8979df71.tar.gz
ports-774ca7d51af8171af5bef0c9b1462b2d8979df71.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/squirrelmail/Makefile9
-rw-r--r--mail/squirrelmail/files/pkg-install.in32
2 files changed, 10 insertions, 31 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile
index b9775011d75f..a0bd62e6293f 100644
--- a/mail/squirrelmail/Makefile
+++ b/mail/squirrelmail/Makefile
@@ -31,11 +31,16 @@ DATABASE_DESC= PEAR database support (must also intall a driver)
# if you were using WITHOUT_WWWDIR, use SQUIRRELDIR=${PREFIX}/${PORTNAME}
SQUIRRELDIR?= ${PREFIX}/www/${PORTNAME}
+SMUSER?= ${WWWOWN}
+SMGROUP?= ${WWWGRP}
+USERS= ${SMUSER}
+GROUPS= ${SMGROUP}
+
PLIST_SUB= PORTVERSION=${PORTVERSION} \
SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}"
SUB_FILES= pkg-message pkg-install pkg-deinstall
-SUB_LIST= SQUIRRELDIR=${SQUIRRELDIR}
+SUB_LIST= SQUIRRELDIR=${SQUIRRELDIR} SMUSER=${SMUSER} SMGROUP=${SMGROUP}
PORTDOCS= *
@@ -109,7 +114,7 @@ do-install:
.for DIR in class config data functions help images include locale plugins po src themes
@${CP} -rpv ${WRKSRC}/${DIR} ${SQUIRRELDIR}
.endfor
- ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${SQUIRRELDIR}/data
+ ${CHOWN} -R ${SMUSER}:${SMGROUP} ${SQUIRRELDIR}/data
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@${CP} -Rv ${WRKSRC}/doc/* ${DOCSDIR}
diff --git a/mail/squirrelmail/files/pkg-install.in b/mail/squirrelmail/files/pkg-install.in
index 0b09cf9464aa..0506ee7af3d1 100644
--- a/mail/squirrelmail/files/pkg-install.in
+++ b/mail/squirrelmail/files/pkg-install.in
@@ -10,39 +10,13 @@ SQUIRRELDIR=%%SQUIRRELDIR%%
case $2 in
PRE-INSTALL)
- USER=www
- GROUP=${USER}
- UID=80
- GID=${UID}
-
- if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner"; \
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-
exit 0
;;
POST-INSTALL)
if [ "${PKG_BATCH}" = "NO" ]; then
- install -d -o www -g www -m 0755 /var/spool/squirrelmail
- install -d -o www -g www -m 0730 /var/spool/squirrelmail/attach
- install -d -o www -g www -m 0750 /var/spool/squirrelmail/pref
+ install -d -o %%SMUSER%% -g %%SMGROUP%% -m 0755 /var/spool/squirrelmail
+ install -d -o %%SMUSER%% -g %%SMGROUP%% -m 0730 /var/spool/squirrelmail/attach
+ install -d -o %%SMUSER%% -g %%SMGROUP%% -m 0750 /var/spool/squirrelmail/pref
if [ ! -f /var/spool/squirrelmail/pref/default_pref ]; then
cp -rp ${SQUIRRELDIR}/data/default_pref \
/var/spool/squirrelmail/pref/default_pref