From 6e5d0e18d2dcd829a129eff2f94cff0788188aea Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 30 Jun 2017 13:33:51 -0400 Subject: libre/bogofilter: Adopt, clean up, reduce diff from Arch PKGBUILD --- libre/bogofilter/PKGBUILD | 54 ++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'libre/bogofilter/PKGBUILD') diff --git a/libre/bogofilter/PKGBUILD b/libre/bogofilter/PKGBUILD index 46c9c00b8..2c7a097b5 100644 --- a/libre/bogofilter/PKGBUILD +++ b/libre/bogofilter/PKGBUILD @@ -1,46 +1,52 @@ -# $Id: PKGBUILD 260085 2016-02-20 18:28:03Z andyrtr $ +# $Id$ # Maintainer (Arch): AndyRTR # Contributor (Arch): tobias # Contributor (Arch): Low Kian Seong -# Maintainer: Márcio Silva +# Maintainer: Luke Shumaker + +# Justification for being in [libre]: The source tarball contains +# nonfree documentation files. This does not affect the resulting +# package, but it is an FSDG violation, so we must repack the source +# tarball. pkgname=bogofilter -_pkgname=$pkgname-libre pkgver=1.2.4 -pkgrel=3.parabola1 +pkgrel=3.parabola2 pkgdesc="A fast Bayesian spam filtering tool, without noncommercial files" +_srcrel=1 # increment this to rebuild the sourceball without bumping pkgver +pkgdesc="A fast Bayesian spam filtering tool" arch=('i686' 'x86_64' 'armv7h') license=('GPL3') -url="http://$pkgname.sourceforge.net" +url="http://bogofilter.sourceforge.net" 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 +backup=('etc/bogofilter/bogofilter.cf') +source=(https://repo.parabola.nu/other/bogofilter-libre/${pkgname}-${pkgver}-libre${_srcrel}.tar.gz bogofilter-1.2.4-test-env.patch) -mkmd5sums=('d0a5eebb3274b23ceabe766a6443a1c5') -md5sums=('cce573e059d39a68cf78097dbfaa5b2d' +md5sums=('6e2982e7f6dae9b8f3ef2b4e05f6c3df' 'd01f23755ee9b4f5807b9feefea0b42d') -replaces=("${_pkgname}") -conflicts=("${_pkgname}") + +replaces=(bogofilter-libre) +conflicts=(bogofilter-libre) + +mksource=(http://sourceforge.net/projects/${pkgname}/files/${pkgname}-current/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2) +mkmd5sums=('d0a5eebb3274b23ceabe766a6443a1c5') +mksource() { + # Several of the documentation files are nonfree + rm "${srcdir}/${pkgname}-${pkgver}"/doc/bogofilter-SA-{2005-0{1,2},2010-01} +} # 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 - rm doc/$pkgname-SA-{2005-0{1,2},2010-01} -} +# other backend aren't available +# currently in Arch repos prepare() { cd ${pkgname}-${pkgver} # taken from Gentoo - patch -Np1 -i $srcdir/$pkgname-1.2.4-test-env.patch + patch -Np1 -i $srcdir/bogofilter-1.2.4-test-env.patch chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id} autoreconf -vfi } @@ -48,7 +54,7 @@ prepare() { build() { cd ${pkgname}-${pkgver} ./configure --prefix=/usr \ - --sysconfdir=/etc/$pkgname \ + --sysconfdir=/etc/bogofilter \ --localstatedir=/var \ --enable-transactions \ --with-database=db #--help @@ -56,7 +62,7 @@ build() { } check() { - cd ${pkgname}-${pkgver} + cd $pkgname-$pkgver BF_RUN_VALGRIND=1 make -k -C src check || /bin/true } @@ -64,7 +70,7 @@ package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install - mv "${pkgdir}/etc/$pkgname/$pkgname.cf.example" "${pkgdir}/etc/$pkgname/$pkgname.cf" + 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/" -- cgit v1.2.3