- Fix build with clamav-0.9x looking for daily.inc and daily.cvd on configure

- Move pkg-{deinstall,install,message} to files and use it with SUB_FILES and
  SUB_LIST
- Clean a bit pkg-plist and add message to files/pkg-deinstall.in
- Remove unecessary MASTER_SITE_SUBDIR
- Bump PORTREVISION since CLAMAV is a default OPTION

PR:		ports/115560
Submitted by:	garga
Approved by:	maintainer timeout (15 days)
This commit is contained in:
Renato Botelho 2007-08-30 16:12:16 +00:00
parent 403823227e
commit 965dd3901a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=198539
6 changed files with 47 additions and 37 deletions

View file

@ -7,10 +7,9 @@
PORTNAME= simscan
PORTVERSION= 1.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= mail security
MASTER_SITES= http://www.inter7.com/simscan/
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.r/rc/}
MAINTAINER= toxa@toxahost.ru
@ -22,8 +21,13 @@ GNU_CONFIGURE= yes
WORKDIR?= ${QMAIL_PREFIX}/${PORTNAME}
QMAIL_QUEUE= ${QMAIL_PREFIX}/bin/qmail-queue
PLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX} \
SUB_FILES= pkg-message \
pkg-install \
pkg-deinstall
SUB_LIST= QMAIL_PREFIX=${QMAIL_PREFIX} \
SIMSCAN_DIR=${PORTNAME}
PLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX}
OPTIONS= CLAMAV "Support for ClamAV Virus Scanning" on \
RIPMIME "Ripmime Processing (if Clamav ScanMail disabled)" on \
@ -110,22 +114,26 @@ if ! ${TEST} -f ${QMAIL_QUEUE}; then \
exit 1; \
fi
post-patch:
@${REINPLACE_CMD} -E 's,($f/daily.cvd"),\1 || test -d "$f/daily.inc",' \
${WRKSRC}/configure
pre-configure:
@${ECHO_MSG} ""
@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
@${ECHO_MSG} "You may also use the following build options:"
@${ECHO_MSG} ""
@${ECHO_MSG} "QMAIL_PREFIX Base qmail directory. Default is /var/qmail"
@${ECHO_MSG} "WORKDIR Directory to unpack emails. Default is /var/qmail/simscan"
@${ECHO_MSG} "QMAIL_QUEUE Define full path and name of the qmail-queue program"
@${ECHO_MSG} " Incoming mail is passed to this program after being"
@${ECHO_MSG} " scanned by SimScan. Default is /var/qmail/bin/qmail-queue"
@${ECHO_MSG} "SPAMC_ARGS Define the arguments to pass to spamc."
@${ECHO_MSG} " Be sure to place quotes around the options you define"
@${ECHO_MSG} "SPAM_HITS Reject spam only above this hit level"
@${ECHO_MSG} " Default is 10.0. Useful without PASSTHRU option"
@${ECHO_MSG} "QUARANTINE_DIR Directory to keep spam and/or infected emails"
@${ECHO_MSG} " Default is disabled"
@${ECHO_MSG} "QMAIL_PREFIX Base qmail directory. Default is ${QMAIL_PREFIX}"
@${ECHO_MSG} "WORKDIR Directory to unpack emails. Default is ${QMAIL_PREFIX}/${PORTNAME}"
@${ECHO_MSG} "QMAIL_QUEUE Define full path and name of the qmail-queue program"
@${ECHO_MSG} " Incoming mail is passed to this program after being"
@${ECHO_MSG} " scanned by SimScan. Default is ${QMAIL_PREFIX}/bin/qmail-queue"
@${ECHO_MSG} "SPAMC_ARGS Define the arguments to pass to spamc."
@${ECHO_MSG} " Be sure to place quotes around the options you define"
@${ECHO_MSG} "SPAM_HITS Reject spam only above this hit level"
@${ECHO_MSG} " Default is 10.0. Useful without PASSTHRU option"
@${ECHO_MSG} "QUARANTINE_DIR Directory to keep spam and/or infected emails"
@${ECHO_MSG} " Default is disabled"
@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
@${ECHO_MSG} ""

View file

@ -0,0 +1,19 @@
#!/bin/sh
#
# $FreeBSD$
USER=simscan
GROUP=${USER}
if [ x$2 != xDEINSTALL ]; then
exit
fi
pw groupdel -n ${GROUP} || true
pw userdel -n ${GROUP} || true
rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
echo ""
echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
echo ""

View file

@ -6,7 +6,7 @@ USER=simscan
GROUP=${USER}
UID=74
GID=${UID}
SIMDIR=/var/qmail/simscan
SIMDIR=%%QMAIL_PREFIX%%/%%SIMSCAN_DIR%%
if [ "$2" = "PRE-INSTALL" ]; then
@ -43,8 +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
/bin/chmod 04711 %%QMAIL_PREFIX%%/bin/simscan
/usr/sbin/chown $USER:$GROUP %%QMAIL_PREFIX%%/bin/simscan %%QMAIL_PREFIX%%/bin/simscanmk
fi
fi

View file

@ -5,13 +5,13 @@ NOTES:
* You have to configure your anti-virus and anti-spam products!
* You have to modify your qmail startup files to call simscan.
In most cases, you just need to edit /var/qmail/tcp.smtp in
In most cases, you just need to edit %%QMAIL_PREFIX%%/tcp.smtp in
order to call simscan instead of qmail-queue, by setting up
QMAILQUEUE variable. For example:
127.0.0.1:allow,RELAYCLIENT=""
192.168.0.:allow,RELAYCLIENT="",QMAILQUEUE="/var/qmail/bin/simscan"
:allow,QMAILQUEUE="/var/qmail/bin/simscan"
192.168.0.:allow,RELAYCLIENT="",QMAILQUEUE="%%QMAIL_PREFIX%%/bin/simscan"
:allow,QMAILQUEUE="%%QMAIL_PREFIX%%/bin/simscan"
* Don't forget to rebuild tcp.smtp.cdb from new tcp.smtp using tcprules!

View file

@ -1,13 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
USER=simscan
GROUP=${USER}
if [ x$2 != xDEINSTALL ]; then
exit
fi
pw groupdel -n ${GROUP} || true
pw userdel -n ${GROUP} || true

View file

@ -1,7 +1,3 @@
@cwd %%QMAIL_PREFIX%%
bin/simscanmk
bin/simscan
@unexec rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
@unexec echo ""
@unexec echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
@unexec echo ""