diff options
-rw-r--r-- | mail/p5-Mail-SpamAssassin/Makefile | 8 | ||||
-rw-r--r-- | mail/p5-Mail-SpamAssassin/files/spamd.sh | 20 |
2 files changed, 26 insertions, 2 deletions
diff --git a/mail/p5-Mail-SpamAssassin/Makefile b/mail/p5-Mail-SpamAssassin/Makefile index ffa684b..1131e69 100644 --- a/mail/p5-Mail-SpamAssassin/Makefile +++ b/mail/p5-Mail-SpamAssassin/Makefile @@ -7,7 +7,7 @@ PORTNAME= Mail-SpamAssassin PORTVERSION= 2.01 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= Mail @@ -30,8 +30,12 @@ MAN1= spamd.1 spamassassin.1 spamc.1 post-patch: @find ${WRKSRC} -type f -name "*.orig" -exec rm -f "{}" ";" -.if !defined(NOPORTDOCS) post-install: + strip ${PREFIX}/bin/spamc + cd ${FILESDIR}; \ + ${INSTALL_DATA} spamd.sh \ + ${PREFIX}/etc/rc.d/spamd.sh-dist +.if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/sample-nonspam.txt ${DOCSDIR} diff --git a/mail/p5-Mail-SpamAssassin/files/spamd.sh b/mail/p5-Mail-SpamAssassin/files/spamd.sh new file mode 100644 index 0000000..3205838 --- /dev/null +++ b/mail/p5-Mail-SpamAssassin/files/spamd.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + [ -x ${PREFIX}/bin/spamd ] && ${PREFIX}/bin/spamd -a -c -d && echo -n ' spamd' + ;; +stop) + killall spamd && echo -n ' spamd' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 |