diff options
author | sem <sem@FreeBSD.org> | 2005-05-10 21:00:22 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2005-05-10 21:00:22 +0800 |
commit | 4a7c368fbe20084163fb259a7b2efe2fdb452d49 (patch) | |
tree | 42f9a5680d0183b46de017b4565e79cf565877b2 /mail | |
parent | 754005a744c537df5365f89a7a5e1510de70a4e8 (diff) | |
download | freebsd-ports-gnome-4a7c368fbe20084163fb259a7b2efe2fdb452d49.tar.gz freebsd-ports-gnome-4a7c368fbe20084163fb259a7b2efe2fdb452d49.tar.zst freebsd-ports-gnome-4a7c368fbe20084163fb259a7b2efe2fdb452d49.zip |
- Back to run as root by default and add options to change it
- Fix plist when install no tools
Diffstat (limited to 'mail')
-rw-r--r-- | mail/p5-Mail-SpamAssassin/Makefile | 15 | ||||
-rw-r--r-- | mail/p5-Mail-SpamAssassin/files/spamd.sh | 2 | ||||
-rw-r--r-- | mail/p5-Mail-SpamAssassin/pkg-plist | 24 |
3 files changed, 26 insertions, 15 deletions
diff --git a/mail/p5-Mail-SpamAssassin/Makefile b/mail/p5-Mail-SpamAssassin/Makefile index 5381708047b2..91212c83bfbc 100644 --- a/mail/p5-Mail-SpamAssassin/Makefile +++ b/mail/p5-Mail-SpamAssassin/Makefile @@ -7,7 +7,7 @@ PORTNAME= Mail-SpamAssassin PORTVERSION= 3.0.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail perl5 MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/} MASTER_SITE_SUBDIR= spamassassin/:apache Mail/:cpan @@ -28,7 +28,8 @@ CONFIGURE_ARGS= SYSCONFDIR="${PREFIX}/etc" \ CONTACT_ADDRESS="the administrator of that system" \ BUILD_SPAMC=yes RUN_NET_TESTS=yes -OPTIONS= SSL "Build with SSL support for spamd/spamc" on \ +OPTIONS= AS_ROOT "Run spamd as root (recommended)" on \ + SSL "Build with SSL support for spamd/spamc" on \ MYSQL "Add MySQL support" off \ PGSQL "Add PostreSQL support" off \ SPF_QUERY "Add SPF query support" off \ @@ -65,6 +66,9 @@ USE_SQLDB= yes RUN_DEPENDS+= ${SITE_PERL}/Parse/Syslog.pm:${PORTSDIR}/textproc/p5-Parse-Syslog \ ${SITE_PERL}/Date/Manip.pm:${PORTSDIR}/devel/p5-Date-Manip \ ${SITE_PERL}/Net/CIDR/Lite.pm:${PORTSDIR}/net/p5-Net-CIDR-Lite +TOOLS= "" +.else +TOOLS= "@comment " .endif MAN3= Mail::SpamAssassin.3 \ @@ -93,6 +97,8 @@ MAN3= Mail::SpamAssassin.3 \ MAN1= spamd.1 spamassassin.1 spamc.1 sa-learn.1 +PLIST_SUB+= TOOLS=${TOOLS} + DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} DATADIR= ${PREFIX}/share/spamassassin DOCS= BUGS CREDITS Changes INSTALL LICENSE NOTICE PACKAGING README STATUS TRADEMARK UPGRADE USAGE procmailrc.example @@ -109,6 +115,11 @@ SED_SCRIPT+= -e 's|%%SQL_FLAG%%|-Q|g' .else SED_SCRIPT+= -e 's|%%SQL_FLAG%%||g' .endif +.if !defined(WITH_AS_ROOT) +SED_SCRIPT+= -e 's|%%RUN_AS_USER%%|-u spamd -H /var/spool/spamd|g' +.else +SED_SCRIPT+= -e 's|%%RUN_AS_USER%%||g' +.endif post-patch: @${FIND} ${WRKSRC} -name \*.orig -delete diff --git a/mail/p5-Mail-SpamAssassin/files/spamd.sh b/mail/p5-Mail-SpamAssassin/files/spamd.sh index 40150d36ac27..01f99c7721f7 100644 --- a/mail/p5-Mail-SpamAssassin/files/spamd.sh +++ b/mail/p5-Mail-SpamAssassin/files/spamd.sh @@ -35,7 +35,7 @@ stop_postcmd() spamd_enable=${spamd_enable:-"NO"} spamd_pidfile=${spamd_pidfile:-"/var/run/spamd/spamd.pid"} -spamd_flags=${spamd_flags:-"-c -d %%SQL_FLAG%% -r ${spamd_pidfile} -u spamd -H /var/spool/spamd"} +spamd_flags=${spamd_flags:-"-c -d %%SQL_FLAG%% -r ${spamd_pidfile} %%RUN_AS_USER%%"} load_rc_config $name run_rc_command "$1" diff --git a/mail/p5-Mail-SpamAssassin/pkg-plist b/mail/p5-Mail-SpamAssassin/pkg-plist index 280aede20d86..fb409be645c3 100644 --- a/mail/p5-Mail-SpamAssassin/pkg-plist +++ b/mail/p5-Mail-SpamAssassin/pkg-plist @@ -79,18 +79,18 @@ etc/rc.d/sa-spamd.sh %%DATADIR%%/languages %%DATADIR%%/triplets.txt %%DATADIR%%/user_prefs.template -%%DATADIR%%/tools/README.speedtest -%%DATADIR%%/tools/bayes_dump_to_trusted_networks -%%DATADIR%%/tools/check_whitelist -%%DATADIR%%/tools/convert_awl_dbm_to_sql -%%DATADIR%%/tools/desc_length.pl -%%DATADIR%%/tools/mboxsplit -%%DATADIR%%/tools/sa-stats.pl -%%DATADIR%%/tools/speedtest -%%DATADIR%%/tools/split_corpora -%%DATADIR%%/tools/test_extract -%%DATADIR%%/tools/triplets.pl -@dirrm %%DATADIR%%/tools +%%TOOLS%%%%DATADIR%%/tools/README.speedtest +%%TOOLS%%%%DATADIR%%/tools/bayes_dump_to_trusted_networks +%%TOOLS%%%%DATADIR%%/tools/check_whitelist +%%TOOLS%%%%DATADIR%%/tools/convert_awl_dbm_to_sql +%%TOOLS%%%%DATADIR%%/tools/desc_length.pl +%%TOOLS%%%%DATADIR%%/tools/mboxsplit +%%TOOLS%%%%DATADIR%%/tools/sa-stats.pl +%%TOOLS%%%%DATADIR%%/tools/speedtest +%%TOOLS%%%%DATADIR%%/tools/split_corpora +%%TOOLS%%%%DATADIR%%/tools/test_extract +%%TOOLS%%%%DATADIR%%/tools/triplets.pl +%%TOOLS%%@dirrm %%DATADIR%%/tools @dirrm %%DATADIR%% @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin @unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Mail 2>/dev/null || true |