diff options
author | Amish | 2023-02-06 12:08:56 +0530 |
---|---|---|
committer | Amish | 2023-02-06 12:08:56 +0530 |
commit | a09f9aeffd644f7507026df4255b29a865692755 (patch) | |
tree | d444c270691e5b988d8db469c200d9af1b7fb4f2 | |
parent | ded87a403c691b50c6b82bbed0873312874b6c8e (diff) | |
download | aur-a09f9aeffd644f7507026df4255b29a865692755.tar.gz |
Patch spam module for SpamAssassin v4.0
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | webmin.install | 18 |
3 files changed, 29 insertions, 2 deletions
@@ -1,8 +1,9 @@ pkgbase = webmin pkgdesc = A web-based administration interface for Unix systems pkgver = 2.013 - pkgrel = 1 + pkgrel = 2 url = http://www.webmin.com/ + install = webmin.install arch = any license = custom:webmin depends = perl @@ -4,7 +4,7 @@ pkgname=webmin pkgver=2.013 -pkgrel=1 +pkgrel=2 pkgdesc="A web-based administration interface for Unix systems" arch=(any) license=('custom:webmin') @@ -126,6 +126,7 @@ source=("http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver. webmin.logrotate webmin.tmpfiles) options=(!strip !zipman) +install=webmin.install prepare() { cd "$srcdir"/$pkgname-$pkgver @@ -144,6 +145,13 @@ prepare() { echo 'Archlinux Any version generic-linux * -d "/etc/pacman.d"' > os_list.txt cp -rp "$srcdir"/webmin-config/* "$srcdir"/$pkgname-$pkgver/ install -m 700 "$srcdir"/setup-{pre,post}.sh "$srcdir"/$pkgname-$pkgver/ + + # patch for SpamAssassin 4.0 + # https://cwiki.apache.org/confluence/display/spamassassin/WelcomelistBlocklist + cd spam + sed -i -e 's/white/welcome/g' -e 's/black/block/g' -e 's/White/Welcome/g' -e 's/Black/Block/g' \ + *.pl *.cgi config* defaultacl lang/* + find . -name '*white*' -exec rename white welcome '{}' \+ } package() { diff --git a/webmin.install b/webmin.install new file mode 100644 index 000000000000..1f9a350dc369 --- /dev/null +++ b/webmin.install @@ -0,0 +1,18 @@ +post_upgrade() { + if (( $(vercmp $2 2.013-1) <= 0)); then + sed -i -e 's/white/welcome/g' -e 's/black/block/g' etc/webmin/spam/* || true +cat << _EOF + +>>> Webmin's SpamAssassin (spam) module has been patched for SpamAssassin v4+. +>>> Replaced white/black with welcome/block in /etc/webmin/spam/* +>>> Please verify the same and rename any files if necessary. + +>>> Also do not forget to activate version compatibility: +>>> enable_compat welcomelist_blocklist + +>>> For details, see: +>>> https://cwiki.apache.org/confluence/display/spamassassin/WelcomelistBlocklist + +_EOF + fi +} |