db-move: moved webkitgtk-6.0 from [testing] to [extra] (x86_64)
[arch-packages.git] / bogofilter / repos / extra-x86_64 / PKGBUILD
blob86ebdb5b10f887e45789d0b01dc551064b5a072a
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=7
8 pkgdesc="A fast Bayesian spam filtering tool"
9 arch=('x86_64')
10 license=('GPL3')
11 url="https://bogofilter.sourceforge.io/"
12 depends=('db5.3' 'perl' 'gsl') # 'sqlite'
13 makedepends=('valgrind' 'xmlto')
14 backup=('etc/bogofilter/bogofilter.cf')
15 options=('debug')
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'
19           'SKIP'
20           'd42a6517a4d90835f1d54517056e704f7c01ea19')
21 sha256sums=('3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea'
22             'SKIP'
23             '5adb184d81a302ec13cf6320ce30ef177432ba346373b56febf5ab9b1f449999')
24 validpgpkeys=('DC4A655BD993CD4871FA8210E412B156EFF3855A') # "Matthias Andree <mandree@FreeBSD.org>"
26 # note: build system doesn't allow easy overlinking prevention - no libtool hack possible
28 prepare() {
29   cd "$pkgname-$pkgver"
30   patch -Np1 -i ../bdb_5.3.patch
31   autoreconf -vfi 
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
42 build() {
43   cd "${pkgname}"-${pkgver}
44   ./configure CFLAGS="$CFLAGS -I/usr/include/db5.3" \
45               --prefix=/usr \
46               --sysconfdir=/etc/bogofilter  \
47               --localstatedir=/var \
48               --enable-transactions \
49               --with-database=db  #--help
50   make
53 check() {
54   cd "$pkgname"-$pkgver
55   BF_RUN_VALGRIND=1 make -k -C src check || /bin/true
58 package() {
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