mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
- Back to run as root by default and add options to change it
- Fix plist when install no tools
This commit is contained in:
parent
d06dcbddd8
commit
1e3fea2599
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134988
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user