1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Contributor: tobias <tobias@archlinux.org>
3 # Contributor: Low Kian Seong <fastmail_low@speedymail.org>
8 pkgdesc="A fast Bayesian spam filtering tool"
11 url="https://bogofilter.sourceforge.io/"
12 depends=('db' 'perl' 'gsl') # 'sqlite'
13 makedepends=('valgrind' 'xmlto')
14 backup=('etc/bogofilter/bogofilter.cf')
15 source=(https://downloads.sourceforge.net/project/${pkgname}/${pkgname}-stable/${pkgname}-${pkgver}.tar.xz{,.asc}) # asc file doesn't work with pacman
16 sha1sums=('c779c3afb3e57ae0208ee503a854aff716b0cafd'
18 validpgpkeys=('DC4A655BD993CD4871FA8210E412B156EFF3855A') # "Matthias Andree <mandree@FreeBSD.org>"
20 # note: build system doesn't allow easy overlinking prevention - no libtool hack possible
27 # keep Berkeley DB as backend for now
28 # sqlite3 based backend doesn't allow
29 # to use db-transaction option that is
30 # used to bf_compact the wordlist.db
31 # other backend aren't available
32 # currently in Arch repos
33 # as of 1.2.5 new backend can be KyotoCabinet and lmdb
36 cd "${pkgname}"-${pkgver}
37 ./configure --prefix=/usr \
38 --sysconfdir=/etc/bogofilter \
39 --localstatedir=/var \
40 --enable-transactions \
41 --with-database=db #--help
47 BF_RUN_VALGRIND=1 make -k -C src check || /bin/true
51 cd "${pkgname}"-${pkgver}
52 make DESTDIR="${pkgdir}" install
54 mv "${pkgdir}/etc/bogofilter/bogofilter.cf.example" "${pkgdir}/etc/bogofilter/bogofilter.cf"
56 install -dm755 "${pkgdir}/usr/share/${pkgname}/contrib"
57 install -m644 contrib/* "${pkgdir}/usr/share/${pkgname}/contrib/"
58 rm "${pkgdir}"/usr/share/${pkgname}/contrib/bogogrep.o