aboutsummaryrefslogtreecommitdiff
path: root/mail/simscan
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2005-08-09 13:58:39 +0000
committerRenato Botelho <garga@FreeBSD.org>2005-08-09 13:58:39 +0000
commitd06912e6efb159bf77e12d294c0090426fa385ee (patch)
tree01ebb26682c2f63cbb81a17768a0f22d0b84d7eb /mail/simscan
parentc7c416526e765059632a1e4827fd6b23408ffa47 (diff)
downloadports-d06912e6efb159bf77e12d294c0090426fa385ee.tar.gz
ports-d06912e6efb159bf77e12d294c0090426fa385ee.zip
Notes
Diffstat (limited to 'mail/simscan')
-rw-r--r--mail/simscan/Makefile11
-rw-r--r--mail/simscan/pkg-install2
-rw-r--r--mail/simscan/scripts/configure36
3 files changed, 10 insertions, 39 deletions
diff --git a/mail/simscan/Makefile b/mail/simscan/Makefile
index 04889ffce5e8..cd26374ee85f 100644
--- a/mail/simscan/Makefile
+++ b/mail/simscan/Makefile
@@ -18,6 +18,7 @@ COMMENT= Fast Content/Anti-virus Scanner for qmail Written in C
BUILD_DEPENDS= ${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail
GNU_CONFIGURE= yes
+USE_REINPLACE= yes
# A normal qmail installation puts everything into /var/qmail/.
# Must match your qmail installation
@@ -42,7 +43,8 @@ OPTIONS= CLAMAV "Support for ClamAV Virus Scanning" on \
CONFIGURE_ARGS=--enable-clamavdb-path=/var/db/clamav \
--enable-qmaildir=${QMAIL_DIR} \
--enable-spamc-user=n \
- --enable-workdir=${WORKDIR}
+ --enable-workdir=${WORKDIR} \
+ --enable-user=nobody
.if defined(WITHOUT_CLAMAV)
CONFIGURE_ARGS+= --enable-clamav=n
@@ -130,9 +132,12 @@ pre-configure:
@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
@${ECHO_MSG} ""
+pre-install:
+ @${REINPLACE_CMD} -e 's|nobody|simscan|g' ${WRKSRC}/Makefile
+ @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
post-install:
- @${CHMOD} 04711 ${QMAIL_DIR}/bin/simscan
- @${CHOWN} simscan:simscan ${QMAIL_DIR}/bin/simscan ${QMAIL_DIR}/bin/simscanmk
+ @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
diff --git a/mail/simscan/pkg-install b/mail/simscan/pkg-install
index 43b739839251..a897bd6e098d 100644
--- a/mail/simscan/pkg-install
+++ b/mail/simscan/pkg-install
@@ -43,6 +43,8 @@ elif [ "$2" = "POST-INSTALL" ]; then
/bin/mkdir -p "$SIMDIR" || exit 1
/usr/sbin/chown "$USER:$GROUP" "$SIMDIR" || exit 1
/bin/chmod 0750 "$SIMDIR" || exit 1
+ /bin/chmod 04711 ${QMAIL_DIR}/bin/simscan
+ /bin/chown $USER:$GROUP ${QMAIL_DIR}/bin/simscan ${QMAIL_DIR}/bin/simscanmk
fi
fi
diff --git a/mail/simscan/scripts/configure b/mail/simscan/scripts/configure
deleted file mode 100644
index d502120cd0b5..000000000000
--- a/mail/simscan/scripts/configure
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-
-USER=simscan
-GROUP=${USER}
-UID=74
-GID=${UID}
-
-echo adding simscan user
-
-
- if pw group show "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
- else
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- else
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -d /nonexistent -s /sbin/nologin -c "Simscan User"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi