summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2010-01-16 19:20:17 +0000
committerAlex Dupre <ale@FreeBSD.org>2010-01-16 19:20:17 +0000
commit37d7c41a2a600f260ffc486287f79894bb60df50 (patch)
treee5fbf64304f4fc8b7f02a45db7f48fc4a8649ab3
parentAdd cl-alexandria, a collection of portable public domain utilities (diff)
Make sa-compile support conditional.
Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=247988
-rw-r--r--mail/sa-utils/Makefile14
-rw-r--r--mail/sa-utils/files/sa-utils.in4
2 files changed, 14 insertions, 4 deletions
diff --git a/mail/sa-utils/Makefile b/mail/sa-utils/Makefile
index e8cbc9b3942f..bd57453a1e39 100644
--- a/mail/sa-utils/Makefile
+++ b/mail/sa-utils/Makefile
@@ -15,8 +15,9 @@ DISTFILES= # none
MAINTAINER= m.seaman@infracaninophile.co.uk
COMMENT= SpamAssassin nightly periodic maintenance
-RUN_DEPENDS= sa-update:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
- re2c:${PORTSDIR}/devel/re2c
+RUN_DEPENDS= sa-update:${PORTSDIR}/mail/p5-Mail-SpamAssassin
+
+OPTIONS= SACOMPILE "Enable sa-compile support" off
NO_BUILD= yes
SUB_FILES= sa-utils
@@ -26,6 +27,15 @@ PERIODIC_DAILY= etc/periodic/daily
PLIST_FILES= ${PERIODIC_DAILY}/sa-utils
PLIST_DIRS= ${PERIODIC_DAILY} ${PERIODIC_DAILY:H}
+.include <bsd.port.options.mk>
+
+.if defined(WITH_SACOMPILE)
+RUN_DEPENDS+= re2c>=.12.0:${PORTSDIR}/devel/re2c
+SUB_LIST+= SACOMPILE=YES
+.else
+SUB_LIST+= SACOMPILE=NO
+.endif
+
do-install:
${MKDIR} ${PREFIX}/${PERIODIC_DAILY}/
${INSTALL_SCRIPT} ${WRKDIR}/sa-utils \
diff --git a/mail/sa-utils/files/sa-utils.in b/mail/sa-utils/files/sa-utils.in
index 18e91576b7de..49472b92bffc 100644
--- a/mail/sa-utils/files/sa-utils.in
+++ b/mail/sa-utils/files/sa-utils.in
@@ -32,7 +32,7 @@
# --channel saupdates.example.com \
# --channel updates.spamassassin.org"
#
-# daily_sa_compile="YES"
+# daily_sa_compile="%%SACOMPILE%%"
# run sa-compile to create a compiled form of the filter
# rules when new rules are found. Note: this can be time
# consuming and CPU intensive.
@@ -66,7 +66,7 @@ fi
: ${daily_sa_enable="YES"}
: ${daily_sa_quiet="NO"}
: ${daily_sa_update_flags=""}
-: ${daily_sa_compile="YES"}
+: ${daily_sa_compile="%%SACOMPILE%%"}
: ${daily_sa_compile_flags=""}
: ${daily_sa_compile_nice="YES"}
: ${daily_sa_compile_nice_flags=""}