aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-io-compress
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2018-04-05 06:12:54 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-04-05 06:13:00 +0000
commit988a68f20adb4c8e725827d91c58e4350b38827b (patch)
treed5be43bce882a375f4d4fb5e3c429d2d1af8083b /main/perl-io-compress
parent1060e58e8f9a1ba05c6389f61208a97f2a2f1b6d (diff)
downloadaports-988a68f20adb4c8e725827d91c58e4350b38827b.tar.bz2
aports-988a68f20adb4c8e725827d91c58e4350b38827b.tar.xz
main/perl-io-compress: modernize APKBUILD, add check()
Diffstat (limited to 'main/perl-io-compress')
-rw-r--r--main/perl-io-compress/APKBUILD38
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"