summaryrefslogtreecommitdiff
path: root/mail/p5-Mail-SpamAssassin
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2002-02-26 11:21:22 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2002-02-26 11:21:22 +0000
commite409bf320bbc018a71fd845c8abd4ce722da8002 (patch)
tree55ccc1abe5b34fa048ef86829e2a585048d91263 /mail/p5-Mail-SpamAssassin
parent1) Fix bug when only first locale checked for good charset (diff)
Add sample rc.d/spamd.sh script
Notes
Notes: svn path=/head/; revision=55263
Diffstat (limited to 'mail/p5-Mail-SpamAssassin')
-rw-r--r--mail/p5-Mail-SpamAssassin/Makefile8
-rw-r--r--mail/p5-Mail-SpamAssassin/files/spamd.sh20
2 files changed, 26 insertions, 2 deletions
diff --git a/mail/p5-Mail-SpamAssassin/Makefile b/mail/p5-Mail-SpamAssassin/Makefile
index ffa684b965f0..1131e69df59a 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 000000000000..32058380fe04
--- /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