PKGBUILDs/extra/bogofilter/PKGBUILD

62 lines
1.8 KiB
Bash
Raw Normal View History

2016-04-13 01:27:24 +00:00
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Low Kian Seong <fastmail_low@speedymail.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - drop valgrind makedepend
pkgname=bogofilter
pkgver=1.2.4
2018-11-13 19:31:51 +00:00
pkgrel=4
2016-04-13 01:27:24 +00:00
pkgdesc="A fast Bayesian spam filtering tool"
2018-11-13 19:31:51 +00:00
arch=('x86_64')
2016-04-13 01:27:24 +00:00
license=('GPL3')
url="http://bogofilter.sourceforge.net"
depends=('db' 'perl' 'gsl') # 'sqlite'
makedepends=('xmlto')
backup=('etc/bogofilter/bogofilter.cf')
2018-11-13 19:31:51 +00:00
source=(https://sourceforge.net/projects/${pkgname}/files/${pkgname}-current/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2
2016-04-13 01:27:24 +00:00
bogofilter-1.2.4-test-env.patch)
md5sums=('d0a5eebb3274b23ceabe766a6443a1c5'
'd01f23755ee9b4f5807b9feefea0b42d')
# keep Berkeley DB as backend for now
# sqlite3 based backend doesn't allow
# to use db-transaction option that is
# used to bf_compact the wordlist.db
# other backend aren't available
# currently in Arch repos
prepare() {
cd ${pkgname}-${pkgver}
# taken from Gentoo
patch -Np1 -i $srcdir/bogofilter-1.2.4-test-env.patch
chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id}
autoreconf -vfi
}
build() {
cd ${pkgname}-${pkgver}
./configure --prefix=/usr \
--sysconfdir=/etc/bogofilter \
--localstatedir=/var \
--enable-transactions \
--with-database=db #--help
make
}
check() {
cd $pkgname-$pkgver
2018-11-13 19:31:51 +00:00
BF_RUN_VALGRIND=1 make -k -C src check || /bin/true
2016-04-13 01:27:24 +00:00
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
mv "${pkgdir}/etc/bogofilter/bogofilter.cf.example" "${pkgdir}/etc/bogofilter/bogofilter.cf"
install -dm755 "${pkgdir}/usr/share/${pkgname}/contrib"
install -m644 contrib/* "${pkgdir}/usr/share/${pkgname}/contrib/"
}