mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
PR:
Submitted by: Reviewed by: Approved by: gabor (mentor) Obtained from: MFC after: Security: Feature safe: yes clean up a little for portlint sake. The check for sa rules was not running right (rc keeps changing) Backport DCC.pm from SA 3.4.0, SA bug: 6698
This commit is contained in:
parent
f9d30cef27
commit
a9a3a85257
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=286585
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= Mail-SpamAssassin
|
||||
PORTVERSION= 3.3.2
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= mail perl5
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
|
||||
MASTER_SITE_SUBDIR= spamassassin/source/:apache Mail/:cpan
|
||||
@ -35,15 +35,13 @@ CONFLICTS= ja-p5-Mail-SpamAssassin-[0-9]*
|
||||
PERL_CONFIGURE= yes
|
||||
USE_PERL5_RUN= 5.8.8+
|
||||
USE_LDCONFIG= yes
|
||||
DBDIR?= /var/db
|
||||
CONTACT_ADDRESS?= The administrator of that system
|
||||
USERS?= spamd
|
||||
GROUPS?= spamd
|
||||
CONFIGURE_ARGS= SYSCONFDIR="${PREFIX}/etc" \
|
||||
CONTACT_ADDRESS="${CONTACT_ADDRESS}" \
|
||||
LOCALSTATEDIR="/var/db/spamassassin"
|
||||
|
||||
USERS= spamd
|
||||
GROUPS= spamd
|
||||
|
||||
# You can override it if you like
|
||||
CONTACT_ADDRESS?= The administrator of that system
|
||||
LOCALSTATEDIR="${DBDIR}/spamassassin"
|
||||
|
||||
OPTIONS= AS_ROOT "Run spamd as root (recommended)" on \
|
||||
SPAMC "Build spamd/spamc (not for amavisd)" on \
|
||||
@ -280,7 +278,7 @@ post-build:
|
||||
.endif
|
||||
|
||||
pre-su-install:
|
||||
@USER=${USERS} GROUP=${GROUPS} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
@PREFIX=${PREFIX} BATCH=${BATCH} SU_CMD="${SU_CMD}" USER=${USERS} GROUP=${GROUPS} INSTALL="${INSTALL}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/spamc/libspamc.so ${PREFIX}/lib/libspamc.so.0
|
||||
@${LN} -sf libspamc.so.0 ${PREFIX}/lib/libspamc.so
|
||||
.if !defined(WITHOUT_SSL)
|
||||
@ -305,7 +303,7 @@ post-install:
|
||||
@[ -f ${PREFIX}/etc/mail/spamassassin/v320.pre ] || \
|
||||
${CP} ${PREFIX}/etc/mail/spamassassin/v320.pre.sample \
|
||||
${PREFIX}/etc/mail/spamassassin/v320.pre
|
||||
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} SU_CMD="${SU_CMD}" USER=${USERS} GROUP=${GROUPS} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
|
||||
@PREFIX=${PREFIX} BATCH=${BATCH} SU_CMD="${SU_CMD}" USER=${USERS} GROUP=${GROUPS} INSTALL="${INSTALL}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
@[ -f ${PREFIX}/etc/mail/spamassassin/v330.pre ] || \
|
||||
${CP} ${PREFIX}/etc/mail/spamassassin/v330.pre.sample \
|
||||
${PREFIX}/etc/mail/spamassassin/v330.pre
|
||||
|
1471
mail/p5-Mail-SpamAssassin/files/patch-bug6698
Normal file
1471
mail/p5-Mail-SpamAssassin/files/patch-bug6698
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,6 @@
|
||||
#!/bin/sh
|
||||
PKG_PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
USER=${USER:-spamd}
|
||||
GROUP=${GROUP:-spamd}
|
||||
HOME=/var/spool/${USER}
|
||||
|
||||
if [ "$2" = "POST-INSTALL" ];then
|
||||
if [ "$2" = "POST-INSTALL" ];then
|
||||
ask() {
|
||||
local question default answer
|
||||
|
||||
@ -32,35 +28,35 @@ yesno() {
|
||||
}
|
||||
|
||||
# Create pid directory
|
||||
install -d -o ${USER} -g ${GROUP} /var/run/spamd
|
||||
/usr/bin/su root -c "${PKG_PREFIX}/bin/spamassassin -x -L --lint"
|
||||
|
||||
if [ ${?} -eq 9 ];then
|
||||
echo "***********************************************"
|
||||
echo "*__ ___ ____ _ _ ___ _ _ ____ *"
|
||||
echo "*\ \ / / \ | _ \| \ | |_ _| \ | |/ ___|*"
|
||||
echo "* \ \ /\ / / _ \ | |_) | \| || || \| | | _ *"
|
||||
echo "* \ V V / ___ \| _ <| |\ || || |\ | |_| |*"
|
||||
echo "* \_/\_/_/ \_\_| \_\_| \_|___|_| \_|\____|*"
|
||||
echo "* *"
|
||||
echo "*You must install rules before starting spamd!*"
|
||||
echo "***********************************************"
|
||||
${INSTALL} -d -o ${USER} -g ${GROUP} /var/run/spamd
|
||||
${PREFIX}/bin/spamassassin -x -L --lint
|
||||
if [ ${?} -ne 0 ];then
|
||||
echo "
|
||||
*******************************************************
|
||||
* _ _ _ _______ ______ __ _ _____ __ _ ______ *
|
||||
* | | | |_____| |_____/ | \ | | | \ | | ____ *
|
||||
* |__|__| | | | \_ | \_| __|__ | \_| |_____| *
|
||||
* *
|
||||
*******************************************************
|
||||
* You must install rules before starting spamd! *
|
||||
*******************************************************"
|
||||
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
|
||||
if yesno "Do you wish to run sa-update to fetch new rules" "N";then
|
||||
${PKG_PREFIX}/bin/sa-update || true
|
||||
${PREFIX}/bin/sa-update || true
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
/usr/bin/su root -c "${PKG_PREFIX}/bin/spamassassin -x -L --lint"
|
||||
if [ ${?} -eq 0 ] && grep '^load.*Rule2XSBody' ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null ;then
|
||||
${PREFIX}/bin/spamassassin -x -L --lint
|
||||
if [ ${?} -eq 0 ] && grep '^load.*Rule2XSBody' ${PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null ;then
|
||||
if yesno "Do you wish to compile rules with re2c (will take a long time)" "N";then
|
||||
${PKG_PREFIX}/bin/sa-compile || true
|
||||
${PREFIX}/bin/sa-compile || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi # post-install
|
||||
fi # post-install
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user