PKGBUILDs/extra/bogofilter/PKGBUILD

55 lines
1.7 KiB
Bash
Raw Normal View History

2016-04-13 01:27:24 +00:00
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Low Kian Seong <fastmail_low@speedymail.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - drop valgrind makedepend
pkgname=bogofilter
2019-10-17 12:37:02 +00:00
pkgver=1.2.5
pkgrel=1
2016-04-13 01:27:24 +00:00
pkgdesc="A fast Bayesian spam filtering tool"
2018-11-13 19:31:51 +00:00
arch=('x86_64')
2016-04-13 01:27:24 +00:00
license=('GPL3')
2019-10-17 12:37:02 +00:00
url="https://bogofilter.sourceforge.io/"
2016-04-13 01:27:24 +00:00
depends=('db' 'perl' 'gsl') # 'sqlite'
makedepends=('xmlto')
backup=('etc/bogofilter/bogofilter.cf')
2019-10-17 12:37:02 +00:00
source=(https://downloads.sourceforge.net/project/${pkgname}/${pkgname}-stable/${pkgname}-${pkgver}.tar.xz{,.asc}) # asc file doesn't work with pacman
sha1sums=('c779c3afb3e57ae0208ee503a854aff716b0cafd'
'SKIP')
validpgpkeys=('DC4A655BD993CD4871FA8210E412B156EFF3855A') # "Matthias Andree <mandree@FreeBSD.org>"
2016-04-13 01:27:24 +00:00
# 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
2019-10-17 12:37:02 +00:00
# as of 1.2.5 new backend can be KyotoCabinet and lmdb
2016-04-13 01:27:24 +00:00
build() {
2019-10-17 12:37:02 +00:00
cd "${pkgname}"-${pkgver}
2016-04-13 01:27:24 +00:00
./configure --prefix=/usr \
--sysconfdir=/etc/bogofilter \
--localstatedir=/var \
--enable-transactions \
--with-database=db #--help
make
}
check() {
2019-10-17 12:37:02 +00:00
cd "$pkgname"-$pkgver
2018-11-13 19:31:51 +00:00
BF_RUN_VALGRIND=1 make -k -C src check || /bin/true
2016-04-13 01:27:24 +00:00
}
package() {
2019-10-17 12:37:02 +00:00
cd "${pkgname}"-${pkgver}
2016-04-13 01:27:24 +00:00
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/"
}