# Maintainer: AndyRTR # Contributor: tobias # Contributor: Low Kian Seong pkgname=bogofilter pkgver=1.2.5 pkgrel=8 pkgdesc="A fast Bayesian spam filtering tool" arch=('x86_64') license=('GPL3') url="https://bogofilter.sourceforge.io/" depends=('db5.3' 'perl' 'gsl') # 'sqlite' makedepends=('valgrind' 'xmlto') backup=('etc/bogofilter/bogofilter.cf') source=(https://downloads.sourceforge.net/project/${pkgname}/${pkgname}-stable/${pkgname}-${pkgver}.tar.xz{,.asc} bdb_5.3.patch) # asc file doesn't work with pacman sha1sums=('c779c3afb3e57ae0208ee503a854aff716b0cafd' 'SKIP' 'd42a6517a4d90835f1d54517056e704f7c01ea19') sha256sums=('3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea' 'SKIP' '5adb184d81a302ec13cf6320ce30ef177432ba346373b56febf5ab9b1f449999') validpgpkeys=('DC4A655BD993CD4871FA8210E412B156EFF3855A') # "Matthias Andree " # note: build system doesn't allow easy overlinking prevention - no libtool hack possible prepare() { cd "$pkgname-$pkgver" patch -Np1 -i ../bdb_5.3.patch autoreconf -vfi } # 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 # as of 1.2.5 new backend can be KyotoCabinet and lmdb build() { cd "${pkgname}"-${pkgver} ./configure CFLAGS="$CFLAGS -I/usr/include/db5.3" \ --prefix=/usr \ --sysconfdir=/etc/bogofilter \ --localstatedir=/var \ --enable-transactions \ --with-database=db #--help make } check() { cd "$pkgname"-$pkgver BF_RUN_VALGRIND=1 make -k -C src check || /bin/true } 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/" rm "${pkgdir}"/usr/share/${pkgname}/contrib/bogogrep.o }