diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-04-03 06:13:59 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-04-03 06:14:04 +0000 |
commit | 6ceab4f6b493c07ea44aa67c8145b1a635dd1022 (patch) | |
tree | 6a7d8b9e71fb7cc88eb4ab44ad53d81272c2d5b8 /main/perl-db_file/APKBUILD | |
parent | 8e3f0837d67c4e55e594c553ca71e9ac7d301ed9 (diff) | |
download | aports-6ceab4f6b493c07ea44aa67c8145b1a635dd1022.tar.bz2 aports-6ceab4f6b493c07ea44aa67c8145b1a635dd1022.tar.xz |
main/perl-db_file: modernize APKBUILD, add check()
Diffstat (limited to 'main/perl-db_file/APKBUILD')
-rw-r--r-- | main/perl-db_file/APKBUILD | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/main/perl-db_file/APKBUILD b/main/perl-db_file/APKBUILD index e20c617ff1..51d010bfdb 100644 --- a/main/perl-db_file/APKBUILD +++ b/main/perl-db_file/APKBUILD @@ -1,9 +1,9 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=perl-db_file -_realname=DB_File +_pkgname=DB_File pkgver=1.841 -pkgrel=0 +pkgrel=1 pkgdesc="Perl5 access to Berkeley DB" url="http://search.cpan.org/~pmqs/DB_File-1.820/" arch="all" @@ -12,20 +12,32 @@ depends="perl" makedepends="perl-dev db-dev" install= subpackages="$pkgname-doc" -source="http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/$_realname-$pkgver.tar.gz" +source="http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + default_prepare + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + +} build() { - cd "$srcdir/$_realname-$pkgver" + cd "$builddir" + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make +} - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 +check() { + cd "$builddir" + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make test } 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 } sha512sums="11d370d2ddd129a4e54c20639cd6d674212069f7ba867614190363c45ec3e6fd7999e5eaaffef9d1fb7cdeae146372830840cb943add0fc06dcd2b44ba91e49e DB_File-1.841.tar.gz" |