summaryrefslogtreecommitdiff
path: root/extra/spamassassin
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-09-05 10:33:48 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-09-05 10:33:48 +0200
commit4a133169d99e3d760caad3cbca2781872f4a0805 (patch)
tree73d442004d2d4f70e0194bd78d6b293337ec2456 /extra/spamassassin
parenta420f5c4c2a4eeb411175d086b339b620dba309d (diff)
parent58f5e0b164b5f4c9af61b2e42bd10c85f28b9bed (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/apcupsd/PKGBUILD community/freedroidrpg/PKGBUILD community/lincity-ng/PKGBUILD community/python2-pymongo/PKGBUILD core/openssh/PKGBUILD core/systemd/PKGBUILD core/sysvinit/PKGBUILD extra/gnutls/PKGBUILD extra/gtkmm3/PKGBUILD extra/mkvtoolnix/PKGBUILD multilib/chuck/PKGBUILD multilib/lib32-gdk-pixbuf2/PKGBUILD multilib/lib32-gnutls/PKGBUILD multilib/lib32-libdrm/PKGBUILD multilib/lib32-libdrm/no-pthread-stubs.patch multilib/lib32-sdl/PKGBUILD multilib/wine/PKGBUILD social/monkeysphere/PKGBUILD testing/cups/PKGBUILD testing/cups/cups-systemd-socket.patch testing/cups/cups.install testing/inetutils/PKGBUILD testing/inetutils/ftpd.service testing/libreoffice/PKGBUILD testing/libreoffice/libreoffice-common.csh testing/libreoffice/libreoffice-common.sh testing/modemmanager/PKGBUILD testing/openssh/PKGBUILD testing/openssh/sshd.service testing/openssh/sshd.socket testing/upower/PKGBUILD
Diffstat (limited to 'extra/spamassassin')
-rw-r--r--extra/spamassassin/PKGBUILD13
-rw-r--r--extra/spamassassin/spamassassin.install16
-rw-r--r--extra/spamassassin/spamassassin.service14
3 files changed, 23 insertions, 20 deletions
diff --git a/extra/spamassassin/PKGBUILD b/extra/spamassassin/PKGBUILD
index f2859dc20..cc23aeb76 100644
--- a/extra/spamassassin/PKGBUILD
+++ b/extra/spamassassin/PKGBUILD
@@ -1,9 +1,10 @@
-# $Id: PKGBUILD 146678 2012-01-16 09:03:49Z bluewind $
-# Maintainer: Dale Blount <dale@archlinux.org>
+# $Id: PKGBUILD 165860 2012-09-01 18:36:23Z bluewind $
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Manolis Tzanidakis
pkgname=spamassassin
pkgver=3.3.2
-pkgrel=3
+pkgrel=6
pkgdesc="A mail filter to identify spam."
arch=('i686' 'x86_64' 'mips64el')
license=('APACHE')
@@ -23,10 +24,11 @@ backup=('etc/conf.d/spamd'
install="${pkgname}.install"
options=('!emptydirs')
source=("http://mirrors.devlib.org/apache/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz"
- 'spamd.conf.d' 'spamd')
+ 'spamd.conf.d' 'spamd' 'spamassassin.service')
md5sums=('d1d62cc5c6eac57e88c4006d9633b81e'
'af501c6b0bb937a2775b747cc4b6d150'
- '57545e6877503d897db21e9a2e8bd2b9')
+ '57545e6877503d897db21e9a2e8bd2b9'
+ '1c39572b79bc20c822387814050ee5c1')
build() {
cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
@@ -55,4 +57,5 @@ package() {
install -D -m644 "${srcdir}/spamd.conf.d" "${pkgdir}/etc/conf.d/spamd"
install -D -m755 "${srcdir}/spamd" "${pkgdir}/etc/rc.d/spamd"
+ install -D -m644 "${srcdir}/spamassassin.service" "${pkgdir}/usr/lib/systemd/system/spamassassin.service"
}
diff --git a/extra/spamassassin/spamassassin.install b/extra/spamassassin/spamassassin.install
index 5109956c9..e43453e97 100644
--- a/extra/spamassassin/spamassassin.install
+++ b/extra/spamassassin/spamassassin.install
@@ -1,25 +1,11 @@
-# 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() {
# 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
+ if type re2c &>/dev/null && type sa-compile &>/dev/null && [[ -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
-pre_remove() {
- /bin/true
-}
-
-# arg 1: the old package version
-post_remove() {
- /bin/true
-}
diff --git a/extra/spamassassin/spamassassin.service b/extra/spamassassin/spamassassin.service
new file mode 100644
index 000000000..a74f6e644
--- /dev/null
+++ b/extra/spamassassin/spamassassin.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Spamassassin daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/spamd.pid
+ExecStart=/usr/bin/vendor_perl/spamd --pidfile /var/run/spamd.pid -c
+StandardOutput=syslog
+StandardError=syslog
+Restart=always
+
+[Install]
+WantedBy=multi-user.target