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=('db5.3' 'perl' 'gsl') # 'sqlite'
13 makedepends=('valgrind' 'xmlto')
14 backup=('etc/bogofilter/bogofilter.cf')
16 source=(https://downloads.sourceforge.net/project/${pkgname}/${pkgname}-stable/${pkgname}-${pkgver}.tar.xz{,.asc}
17 bdb_5.3.patch) # asc file doesn't work with pacman
18 sha1sums=('c779c3afb3e57ae0208ee503a854aff716b0cafd'
20 'd42a6517a4d90835f1d54517056e704f7c01ea19')
21 sha256sums=('3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea'
23 '5adb184d81a302ec13cf6320ce30ef177432ba346373b56febf5ab9b1f449999')
24 validpgpkeys=('DC4A655BD993CD4871FA8210E412B156EFF3855A') # "Matthias Andree <mandree@FreeBSD.org>"
26 # note: build system doesn't allow easy overlinking prevention - no libtool hack possible
30 patch -Np1 -i ../bdb_5.3.patch
34 # keep Berkeley DB as backend for now
35 # sqlite3 based backend doesn't allow
36 # to use db-transaction option that is
37 # used to bf_compact the wordlist.db
38 # other backend aren't available
39 # currently in Arch repos
40 # as of 1.2.5 new backend can be KyotoCabinet and lmdb
43 cd "${pkgname}"-${pkgver}
44 ./configure CFLAGS="$CFLAGS -I/usr/include/db5.3" \
46 --sysconfdir=/etc/bogofilter \
47 --localstatedir=/var \
48 --enable-transactions \
49 --with-database=db #--help
55 BF_RUN_VALGRIND=1 make -k -C src check || /bin/true
59 cd "${pkgname}"-${pkgver}
60 make DESTDIR="${pkgdir}" install
62 mv "${pkgdir}/etc/bogofilter/bogofilter.cf.example" "${pkgdir}/etc/bogofilter/bogofilter.cf"
64 install -dm755 "${pkgdir}/usr/share/${pkgname}/contrib"
65 install -m644 contrib/* "${pkgdir}/usr/share/${pkgname}/contrib/"
66 rm "${pkgdir}"/usr/share/${pkgname}/contrib/bogogrep.o