summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/bogofilter/PKGBUILD42
-rw-r--r--libre/bogofilter/bogofilter-1.2.4-test-env.patch11
2 files changed, 43 insertions, 10 deletions
diff --git a/libre/bogofilter/PKGBUILD b/libre/bogofilter/PKGBUILD
index 4b4c55242..5bca64535 100644
--- a/libre/bogofilter/PKGBUILD
+++ b/libre/bogofilter/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 196818 2013-10-20 08:27:26Z andyrtr $
+# $Id: PKGBUILD 260085 2016-02-20 18:28:03Z andyrtr $
# Maintainer (Arch): AndyRTR <andyrtr@archlinux.org>
# Contributor (Arch): tobias <tobias@archlinux.org>
# Contributor (Arch): Low Kian Seong <fastmail_low@speedymail.org>
@@ -7,37 +7,59 @@
pkgname=bogofilter
_pkgname=$pkgname-libre
pkgver=1.2.4
-pkgrel=1.parabola1
+pkgrel=2.parabola1
pkgdesc="A fast Bayesian spam filtering tool, without noncommercial files"
-arch=('i686' 'x86_64' 'mips64el')
+arch=('i686' 'x86_64')
license=('GPL3')
url="http://$pkgname.sourceforge.net"
-depends=('db' 'perl' 'gsl')
+depends=('db' 'perl' 'gsl') # 'sqlite'
+makedepends=('valgrind' 'xmlto')
backup=("etc/$pkgname/$pkgname.cf")
mksource=(http://sourceforge.net/projects/${pkgname}/files/${pkgname}-current/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2)
-source=(https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.bz2)
+source=(https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.bz2
+ bogofilter-1.2.4-test-env.patch)
mkmd5sums=('d0a5eebb3274b23ceabe766a6443a1c5')
-md5sums=('cce573e059d39a68cf78097dbfaa5b2d')
+md5sums=('cce573e059d39a68cf78097dbfaa5b2d'
+ 'd01f23755ee9b4f5807b9feefea0b42d')
replaces=("${_pkgname}")
conflicts=("${_pkgname}")
+# 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 Parabola repos
+
mksource() {
cd ${pkgname}-${pkgver}
-
- # Remove noncommercial files.
+ # remove noncommercial files
rm doc/$pkgname-SA-{2005-0{1,2},2010-01}
}
-build() {
+prepare() {
cd ${pkgname}-${pkgver}
+ # taken from Gentoo
+ patch -Np1 -i $srcdir/$pkgname-1.2.4-test-env.patch
+ chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id}
+ autoreconf -vfi
+}
+build() {
+ cd ${pkgname}-${pkgver}
./configure --prefix=/usr \
--sysconfdir=/etc/$pkgname \
--localstatedir=/var \
- --enable-transactions
+ --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
diff --git a/libre/bogofilter/bogofilter-1.2.4-test-env.patch b/libre/bogofilter/bogofilter-1.2.4-test-env.patch
new file mode 100644
index 000000000..8cf109c45
--- /dev/null
+++ b/libre/bogofilter/bogofilter-1.2.4-test-env.patch
@@ -0,0 +1,11 @@
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -67,7 +67,7 @@
+
+ TESTS=$(BUILT_TESTS) $(TESTSCRIPTS)
+
+-TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(SHELL) $(VERBOSE)
++TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(VERBOSE)
+
+ EXTRA_DIST=$(TESTSCRIPTS) t.frame t.save t.skel \
+ printcore t._abort unsort.pl \