# Maintainer: Leonardo Arena pkgname=spamassassin _realname=Mail-SpamAssassin pkgver=3.4.1 pkgrel=1 pkgdesc="The Powerful #1 Open-Source Spam Filter" url="http://spamassassin.apache.org" arch="all" license="Apache" depends="gnupg perl perl-digest-sha1 perl-io-compress perl-time-hires perl-netaddr-ip perl-mail-dkim perl-html-parser perl-net-dns perl-db_file perl-libwww perl-uri" makedepends="perl-dev zlib-dev" install= subpackages="$pkgname-doc" source="http://www.apache.org/dist/spamassassin/source/$_realname-$pkgver.tar.gz " _builddir="$srcdir/$_realname-$pkgver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg "Applying $i"; patch -p1 -i "$srcdir"/$i || return 1 esac done } build() { cd "$_builddir" PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 make } package() { cd "$_builddir" make DESTDIR="$pkgdir" install install -m755 -D ../../spamd.init $pkgdir/etc/init.d/spamd install -m644 -D ../../spamd.conf $pkgdir/etc/conf.d/spamd mkdir $pkgdir/usr/sbin mv $pkgdir/usr/bin/spamd $pkgdir/usr/sbin/spamd # creates file collision among perl modules find "$pkgdir" -name perllocal.pod -delete } md5sums="76eca1f38c11635d319e62c26d5b034b Mail-SpamAssassin-3.4.1.tar.gz" sha256sums="9b7a95a594cdca4f265707364478b57813b82a0ec7e520d9bc818bfbcafdd726 Mail-SpamAssassin-3.4.1.tar.gz" sha512sums="6a074f1a4177e1969cef575fe3b1b844d27c813d48fe1e07a46f56ffa728fc780897597d00f11acb269317a6308f284f0dee544d504da874d93b0549d094a6a3 Mail-SpamAssassin-3.4.1.tar.gz"