archrelease: copy trunk to extra-x86_64
[arch-packages.git] / bogofilter / repos / extra-x86_64 / PKGBUILD
blob6f45b42d4c09d594f5e44bdb5b78d20382bdb544
1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Contributor: tobias <tobias@archlinux.org>
3 # Contributor: Low Kian Seong <fastmail_low@speedymail.org>
5 pkgname=bogofilter
6 pkgver=1.2.5
7 pkgrel=4
8 pkgdesc="A fast Bayesian spam filtering tool"
9 arch=('x86_64')
10 license=('GPL3')
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'
17           'SKIP')
18 validpgpkeys=('DC4A655BD993CD4871FA8210E412B156EFF3855A') # "Matthias Andree <mandree@FreeBSD.org>"
20 # note: build system doesn't allow easy overlinking prevention - no libtool hack possible
22 prepare() {
23   cd "$pkgname-$pkgver"
24   autoreconf -vfi
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
35 build() {
36   cd "${pkgname}"-${pkgver}
37   ./configure --prefix=/usr \
38               --sysconfdir=/etc/bogofilter  \
39               --localstatedir=/var \
40               --enable-transactions \
41               --with-database=db  #--help
42   make
45 check() {
46   cd "$pkgname"-$pkgver
47   BF_RUN_VALGRIND=1 make -k -C src check || /bin/true
50 package() {
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