diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2014-05-01 17:01:18 +0000 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2014-05-01 17:01:18 +0000 |
commit | e432a01d92048800f051a1eaceb1834d511d5609 (patch) | |
tree | d833d4a6a4646b69ae9e91791c5cac2550f48eb0 /mail/spamassassin/pkg-plist | |
parent | 4e90cff927f05bdc02bcbf8b9d949aaafac511e2 (diff) | |
download | ports-e432a01d92048800f051a1eaceb1834d511d5609.tar.gz ports-e432a01d92048800f051a1eaceb1834d511d5609.zip |
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.
Notes
Notes:
svn path=/head/; revision=352762
Diffstat (limited to 'mail/spamassassin/pkg-plist')
-rw-r--r-- | mail/spamassassin/pkg-plist | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/mail/spamassassin/pkg-plist b/mail/spamassassin/pkg-plist index 46269d28c46a..065dc27c0f04 100644 --- a/mail/spamassassin/pkg-plist +++ b/mail/spamassassin/pkg-plist @@ -1,4 +1,4 @@ -@stopdaemon sa-spamd +@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 -@unexec if cmp -s %B/init.pre.sample %B/init.pre; then rm -f %B/init.pre; fi -%%ETCDIR%%/init.pre.sample -@exec [ -f %B/init.pre ] || cp %B/%f %B/init.pre -@unexec if cmp -s %B/v310.pre.sample %B/v310.pre; then rm -f %B/v310.pre; fi -%%ETCDIR%%/v310.pre.sample -@exec [ -f %B/v310.pre ] || cp %B/%f %B/v310.pre -@unexec if cmp -s %B/v312.pre.sample %B/v312.pre; then rm -f %B/v312.pre; fi -%%ETCDIR%%/v312.pre.sample -@exec [ -f %B/v312.pre ] || cp %B/%f %B/v312.pre -@unexec if cmp -s %B/v320.pre.sample %B/v320.pre; then rm -f %B/v320.pre; fi -%%ETCDIR%%/v320.pre.sample -@exec [ -f %B/v320.pre ] || cp %B/%f %B/v320.pre -@unexec if cmp -s %B/v330.pre.sample %B/v330.pre; then rm -f %B/v330.pre;fi -%%ETCDIR%%/v330.pre.sample -@exec [ -f %B/v330.pre ] || cp %B/%f %B/v330.pre -@unexec if cmp -s %B/v340.pre.sample %B/v340.pre; then rm -f %B/v340.pre;fi -%%ETCDIR%%/v340.pre.sample -@exec [ -f %B/v341.pre ] || cp %B/%f %B/v340.pre +@sample %%ETCDIR%%/local.cf.sample +@sample %%ETCDIR%%/init.pre.sample +@sample %%ETCDIR%%/v310.pre.sample +@sample %%ETCDIR%%/v312.pre.sample +@sample %%ETCDIR%%/v320.pre.sample +@sample %%ETCDIR%%/v330.pre.sample +@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 -@unexec rmdir /var/lib/spamassassin 2>&1 >/dev/null || true -@unexec rmdir /var/lib 2>&1 >/dev/null || true -@unexec rmdir /var/db/spamassassin 2>&1 >/dev/null || true +@dirrmtry /var/lib/spamassassin +@dirrmtry /var/lib +@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" -@exec install -d -o %%USER%% -g %%GROUP%% /var/run/spamd -@unexec rm -rf /var/run/spamd 2>&1 >/dev/null || true +@owner %%USER%% +@group %%GROUP%% +@dirrmtry /var/run/spamd +@group +@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 |