diff options
Diffstat (limited to 'main/perl-io-compress/APKBUILD')
-rw-r--r-- | main/perl-io-compress/APKBUILD | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/main/perl-io-compress/APKBUILD b/main/perl-io-compress/APKBUILD index b8fdcb5afc..dd62fd315c 100644 --- a/main/perl-io-compress/APKBUILD +++ b/main/perl-io-compress/APKBUILD @@ -1,40 +1,50 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=perl-io-compress -_realname=IO-Compress +_pkgname=IO-Compress pkgver=2.080 -pkgrel=0 +pkgrel=1 pkgdesc="Perl compression library" url="http://search.cpan.org/dist/IO-Compress/" arch="noarch" license="GPL PerlArtistic" depends="perl perl-compress-raw-bzip2 perl-compress-raw-zlib" makedepends="perl-dev" -install= -subpackages="" -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" -_builddir="$srcdir/$_realname-$pkgver" +prepare() { + default_prepare + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor +} build() { - cd $_builddir - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 + cd $builddir + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make +} + +check() { + cd "$builddir" + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make test } package() { - cd $_builddir - make DESTDIR="$pkgdir" install || return 1 + cd $builddir + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make DESTDIR="$pkgdir" install # conflicts with core perl - rm "$pkgdir"/usr/bin/zipdetails || return 1 + rm "$pkgdir"/usr/bin/zipdetails rmdir "$pkgdir"/usr/bin 2>/dev/null || true # creates file collision among perl modules - find "$pkgdir" -name perllocal.pod -delete + find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete # man pages are already provided by perl-doc - rm -rf "$pkgdir"/usr/share/man || return 1 + rm -rf "$pkgdir"/usr/share/man } sha512sums="dded028e9512ed9404763b53cdf1485fe3f76a43e0cadda129b91dd8e09697b0a06403576513af2472e6629d02cff5141647372762ab3ac35b8ad4e704b68d41 IO-Compress-2.080.tar.gz" |