diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-04-10 13:31:52 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-04-10 13:32:05 +0000 |
commit | 81319daa39ed1576864251c0b67ab06c8f179d05 (patch) | |
tree | 40845560682c4dc3ad2007be61eaf2b14f9b2619 | |
parent | 576f271ddee51ba9aa4768df0134b81afa6db9c2 (diff) | |
download | aports-81319daa39ed1576864251c0b67ab06c8f179d05.tar.bz2 aports-81319daa39ed1576864251c0b67ab06c8f179d05.tar.xz |
main/razor: add check() and prepare(), modernize APKBUILD
-rw-r--r-- | main/razor/APKBUILD | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/main/razor/APKBUILD b/main/razor/APKBUILD index fc716ecfbf..9bc8419785 100644 --- a/main/razor/APKBUILD +++ b/main/razor/APKBUILD @@ -3,30 +3,38 @@ pkgname=razor _realname=razor-agents pkgver=2.85 -pkgrel=5 +pkgrel=6 pkgdesc="Vipul's Razor is a distributed, collaborative spam detection and filtering network" url="http://razor.sourceforge.net/" arch="all" license="Artistic" depends="perl perl-digest-sha1 perl-getopt-long perl-uri" makedepends="perl-dev" -install= subpackages="$pkgname-doc" source="http://downloads.sourceforge.net/razor/razor-agents/$_realname-$pkgver.tar.bz2" +builddir="$srcdir/$_realname-$pkgver" +prepare() { + cd "$builddir" + export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor +} build() { - cd "$srcdir/$_realname-$pkgver" - - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + cd "$builddir" + export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` make -j1 } package() { - cd "$srcdir/$_realname-$pkgver" + cd "$builddir" make DESTDIR="$pkgdir" install - # creates file collision among perl modules - find "$pkgdir" -name perllocal.pod -delete + find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete +} + +check() { + cd "$builddir" + make test } md5sums="014d08db40187cb1316482191566b012 razor-agents-2.85.tar.bz2" |