[arch-commits] Commit in spamassassin/trunk (PKGBUILD spamassassin.install)
Paul Mattal
paul at archlinux.org
Sat Mar 6 22:49:00 UTC 2010
Date: Saturday, March 6, 2010 @ 17:49:00
Author: paul
Revision: 71393
added auto detection of compiled rules and running of sa-update (FS#17731)
Modified:
spamassassin/trunk/PKGBUILD
spamassassin/trunk/spamassassin.install
----------------------+
PKGBUILD | 5 +++--
spamassassin.install | 10 ++++++----
2 files changed, 9 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-03-06 22:20:36 UTC (rev 71392)
+++ PKGBUILD 2010-03-06 22:49:00 UTC (rev 71393)
@@ -4,7 +4,7 @@
pkgname=spamassassin
pkgver=3.3.0
-pkgrel=1
+pkgrel=2
pkgdesc="A mail filter to identify spam."
arch=(i686 x86_64)
license=(APACHE)
@@ -15,7 +15,8 @@
'perl-archive-tar' 'zlib' 're2c')
makedepends=('razor' 'perl-dbi')
optdepends=('razor: to identify collaborately-flagged spam'
- 'gnupg: gpg support, without this use --nogpg flag for sa-update')
+ 'gnupg: gpg support, without this use --nogpg flag for sa-update'
+ 're2c: regexp compiler, for compiling rules with sa-compile')
backup=(etc/conf.d/spamd etc/mail/spamassassin/local.cf \
etc/mail/spamassassin/init.pre \
etc/mail/spamassassin/v310.pre \
Modified: spamassassin.install
===================================================================
--- spamassassin.install 2010-03-06 22:20:36 UTC (rev 71392)
+++ spamassassin.install 2010-03-06 22:49:00 UTC (rev 71393)
@@ -1,15 +1,17 @@
# arg 1: the new package version
post_install() {
+ echo "You must run 'sa-update' to install spam rules before use."
/bin/true
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
- echo "You must run 'sa-update' to install spam rules before use."
- echo "For detailed upgrade notes, see:"
- echo " http://svn.apache.org/repos/asf/spamassassin/tags/spamassassin_current_release_3.3.x/UPGRADE"
- post_install
+ # Compile rules, if rules have previously been compiled, and it's possible
+ if [ -x /usr/bin/re2c -a -x /usr/bin/perlbin/vendor/sa-compile -a -d /var/lib/spamassassin/compiled ]; then
+ echo "Detected compiled rules, running sa-compile..."
+ sa-compile > /dev/null 2>&1
+fi
}
# arg 1: the old package version
More information about the arch-commits
mailing list