summaryrefslogtreecommitdiff
path: root/extra/spamassassin/PKGBUILD
blob: 6409bde25214e913362a774cd67bfb40547d60f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# $Id: PKGBUILD 205860 2014-02-11 21:25:20Z bluewind $
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Manolis Tzanidakis
pkgname=spamassassin
pkgver=3.4.0
pkgrel=1
pkgdesc="A mail filter to identify spam."
arch=('i686' 'x86_64' 'mips64el')
license=('APACHE')
url="http://spamassassin.apache.org"
depends=('openssl' 'zlib' 're2c' 'perl-net-dns' 'perl-io-socket-ssl'
         'perl-libwww' 'perl-mail-spf' 'perl-http-message' 'perl-net-http'
         'perl-io-socket-inet6' 'perl-mail-dkim' 'perl-crypt-ssleay')
makedepends=('razor' 'perl-dbi')
optdepends=('razor: to identify collaborately-flagged spam')
backup=('etc/mail/spamassassin/local.cf'
        'etc/mail/spamassassin/init.pre'
        'etc/mail/spamassassin/v310.pre'
        'etc/mail/spamassassin/v312.pre'
        'etc/mail/spamassassin/v320.pre'
        'etc/mail/spamassassin/v330.pre')
install="${pkgname}.install"
source=("http://www.us.apache.org/dist/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz"{,.asc}
        'spamassassin.service')
md5sums=('5d0b50cee3bfa905cca35c33296c8c2a'
         'SKIP'
         'd0ce5f8a02fd74dbc83632f4aaec6185')

prepare() {
  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"

  sed -i t/sa_compile.t \
	  -e 's#/foo/bin/spamassassin#/foo/bin/site_perl/spamassassin#' \
	  -e 's#/foo/bin/sa-compile#/foo/bin/site_perl/sa-compile#'
}

build() {
  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"

  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor \
      CONTACT_ADDRESS=root@localhost ENABLE_SSL=yes PERL_TAINT=no
  make 
}

check() {
  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"

  # parallel tests cause lots of failures; disable for now
  #export HARNESS_OPTIONS="j$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/')"

  make test
}

package() {
  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
  make DESTDIR="${pkgdir}" install

  install -D -m644 "${srcdir}/spamassassin.service" "${pkgdir}/usr/lib/systemd/system/spamassassin.service"
  install -d -o 182 -g 182 -m 755 "$pkgdir/var/lib/spamassassin"
}