summaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2002-02-26 11:21:22 +0000
committerache <ache@FreeBSD.org>2002-02-26 11:21:22 +0000
commitc7a79a3bcd213f86b79cee3a9a523575ef899914 (patch)
treea2f6f400981a28d73a71214d32ff065f38daf70d /mail
parentd923b7b58083a233dfe2b47bacc9bf880a4a6977 (diff)
downloadFreeBSD-ports-c7a79a3bcd213f86b79cee3a9a523575ef899914.zip
FreeBSD-ports-c7a79a3bcd213f86b79cee3a9a523575ef899914.tar.gz
Add sample rc.d/spamd.sh script
Diffstat (limited to 'mail')
-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 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
OpenPOWER on IntegriCloud