svn commit: r352762 - in head: japanese/spamassassin japanese/spamassassin/files mail/spamassassin
Adam Weinberger
adamw at FreeBSD.org
Thu May 1 17:01:19 UTC 2014
Author: adamw
Date: Thu May 1 17:01:18 2014
New Revision: 352762
URL: http://svnweb.freebsd.org/changeset/ports/352762
QAT: https://qat.redports.org/buildarchive/r352762/
Log:
Improvements.
Let pkg-create handle ownership/mode better. Use @dirrmtry instead of
@unexec rmdir. Use COPYTREE_SHARE to ensure proper permissions.
Also, stop the spamd service on deinstall if it's running. It creates
zombie issues otherwise... I'm pretty sure this is the right thing to
do.
Modified:
head/japanese/spamassassin/Makefile
head/japanese/spamassassin/files/spamassassin-ja.plist
head/mail/spamassassin/Makefile
head/mail/spamassassin/pkg-plist
Modified: head/japanese/spamassassin/Makefile
==============================================================================
--- head/japanese/spamassassin/Makefile Thu May 1 16:50:34 2014 (r352761)
+++ head/japanese/spamassassin/Makefile Thu May 1 17:01:18 2014 (r352762)
@@ -1,7 +1,7 @@
# Created by: TAOKA Fumiyoshi
# $FreeBSD$
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= japanese mail perl5
PKGNAMEPREFIX= ja-
Modified: head/japanese/spamassassin/files/spamassassin-ja.plist
==============================================================================
--- head/japanese/spamassassin/files/spamassassin-ja.plist Thu May 1 16:50:34 2014 (r352761)
+++ head/japanese/spamassassin/files/spamassassin-ja.plist Thu May 1 17:01:18 2014 (r352762)
@@ -7,6 +7,4 @@
%%PERL5_MAN3%%/Mail::SpamAssassin::Plugin::Tokenizer::MeCab.3.gz
%%PERL5_MAN3%%/Mail::SpamAssassin::Plugin::Tokenizer::SimpleJA.3.gz
%%PERL5_MAN3%%/Mail::SpamAssassin::Util::Charset.3.gz
- at unexec if cmp -s %D/%%ETCDIR%%/%%TOKENIZER_PRE%%.sample %D/%%ETCDIR%%/%%TOKENIZER_PRE%%; then rm -f %D/%%ETCDIR%%/%%TOKENIZER_PRE%%; fi
-%%ETCDIR%%/%%TOKENIZER_PRE%%.sample
- at exec if [ ! -f %B/%%TOKENIZER_PRE%% ]; then cp -p %B/%f %B/%%TOKENIZER_PRE%%; fi
+ at sample %%ETCDIR%%/%%TOKENIZER_PRE%%.sample
Modified: head/mail/spamassassin/Makefile
==============================================================================
--- head/mail/spamassassin/Makefile Thu May 1 16:50:34 2014 (r352761)
+++ head/mail/spamassassin/Makefile Thu May 1 17:01:18 2014 (r352762)
@@ -3,7 +3,7 @@
PORTNAME= spamassassin
PORTVERSION= 3.4.0
-PORTREVISION?= 9 # also bump japanese/spamassassin
+PORTREVISION?= 10 # also bump japanese/spamassassin
CATEGORIES?= mail perl5
MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
MASTER_SITE_SUBDIR= spamassassin/source/:apache Mail/:cpan
@@ -171,10 +171,9 @@ pre-su-install:
post-install::
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/spamc
- @${MKDIR} ${STAGEDIR}/var/lib/spamassassin ${STAGEDIR}${DBDIR}/spamassassin
- @${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DOCSDIR}/sql ${STAGEDIR}${DOCSDIR}/ldap
+ @${MKDIR} ${STAGEDIR}/var/lib/spamassassin ${STAGEDIR}${DBDIR}/spamassassin ${STAGEDIR}/var/run/spamd
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/sql/* ${STAGEDIR}${DOCSDIR}/sql
- ${INSTALL_DATA} ${WRKSRC}/ldap/* ${STAGEDIR}${DOCSDIR}/ldap
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} "sql ldap" ${STAGEDIR}${DOCSDIR})
.include <bsd.port.post.mk>
Modified: head/mail/spamassassin/pkg-plist
==============================================================================
--- head/mail/spamassassin/pkg-plist Thu May 1 16:50:34 2014 (r352761)
+++ head/mail/spamassassin/pkg-plist Thu May 1 17:01:18 2014 (r352762)
@@ -1,4 +1,4 @@
- at stopdaemon sa-spamd
+ at unexec if service sa-spamd status | grep -q "spamd is running"; then service sa-spamd stop; fi
bin/sa-awl
bin/sa-check_spamd
bin/sa-compile
@@ -8,25 +8,13 @@ bin/spamassassin
bin/spamc
bin/spamd
@unexec rm -rf %D/%%ETCDIR%%/sa-update-keys 2>&1 >/dev/null || true
-%%ETCDIR%%/local.cf.sample
- at unexec if cmp -s %B/init.pre.sample %B/init.pre; then rm -f %B/init.pre; fi
-%%ETCDIR%%/init.pre.sample
- at exec [ -f %B/init.pre ] || cp %B/%f %B/init.pre
- at unexec if cmp -s %B/v310.pre.sample %B/v310.pre; then rm -f %B/v310.pre; fi
-%%ETCDIR%%/v310.pre.sample
- at exec [ -f %B/v310.pre ] || cp %B/%f %B/v310.pre
- at unexec if cmp -s %B/v312.pre.sample %B/v312.pre; then rm -f %B/v312.pre; fi
-%%ETCDIR%%/v312.pre.sample
- at exec [ -f %B/v312.pre ] || cp %B/%f %B/v312.pre
- at unexec if cmp -s %B/v320.pre.sample %B/v320.pre; then rm -f %B/v320.pre; fi
-%%ETCDIR%%/v320.pre.sample
- at exec [ -f %B/v320.pre ] || cp %B/%f %B/v320.pre
- at unexec if cmp -s %B/v330.pre.sample %B/v330.pre; then rm -f %B/v330.pre;fi
-%%ETCDIR%%/v330.pre.sample
- at exec [ -f %B/v330.pre ] || cp %B/%f %B/v330.pre
- at unexec if cmp -s %B/v340.pre.sample %B/v340.pre; then rm -f %B/v340.pre;fi
-%%ETCDIR%%/v340.pre.sample
- at exec [ -f %B/v341.pre ] || cp %B/%f %B/v340.pre
+ at sample %%ETCDIR%%/local.cf.sample
+ at sample %%ETCDIR%%/init.pre.sample
+ at sample %%ETCDIR%%/v310.pre.sample
+ at sample %%ETCDIR%%/v312.pre.sample
+ at sample %%ETCDIR%%/v320.pre.sample
+ at sample %%ETCDIR%%/v330.pre.sample
+ at sample %%ETCDIR%%/v340.pre.sample
include/libspamc.h
lib/libspamc.so
lib/libspamc.so.0
@@ -229,17 +217,21 @@ man/man1/spamd.1.gz
@dirrmtry %%SITE_PERL%%/Mail
@dirrmtry %%ETCDIR%%
@dirrmtry etc/mail
+
@unexec rm -rf /var/lib/spamassassin/2* 2>&1 >/dev/null || true
- at unexec rmdir /var/lib/spamassassin 2>&1 >/dev/null || true
- at unexec rmdir /var/lib 2>&1 >/dev/null || true
- at unexec rmdir /var/db/spamassassin 2>&1 >/dev/null || true
+ at dirrmtry /var/lib/spamassassin
+ at dirrmtry /var/lib
+ at dirrmtry /var/db/spamassassin
@unexec [ -d /var/db/spamassassin ] && echo "If you are no longer using SpamAssassin, remove /var/db/spamassassin"
@unexec pw usershow "%%USER%%" 2>/dev/null 1>&2 && echo "To delete %%USER%% permanently, 'rmuser %%USER%%'"
@unexec pw usershow "%%USER%%" 2>/dev/null 1>&2 && [ -d /var/spool/spamd ] && echo " Note that this will remove /var/spool/spamd"
- at exec install -d -o %%USER%% -g %%GROUP%% /var/run/spamd
- at unexec rm -rf /var/run/spamd 2>&1 >/dev/null || true
+ at owner %%USER%%
+ at group %%GROUP%%
+ at dirrmtry /var/run/spamd
+ at group
+ at owner
@exec if [ "%%UPDATE_ON_INSTALL%%" = "yes" ]; then echo "====> Downloading SpamAssassin rulesets"; %%PREFIX%%/bin/spamassassin -x -L --lint; %%PREFIX%%/bin/sa-update || true; fi
@exec if [ "%%UPDATE_ON_INSTALL%%" = "yes" ]; then echo "====> Compiling SpamAssassin rulesets"; %%PREFIX%%/bin/spamassassin -x -L --lint; %%PREFIX%%/bin/sa-compile || true; fi
More information about the svn-ports-all
mailing list