From e9cb879ec5c0d5ca317f05b6cd83c40178ef0606 Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Mon, 20 Aug 2018 07:47:32 +0000 Subject: main/perl-archive-zip: modernize APKBUILD, add check() --- main/perl-archive-zip/APKBUILD | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/main/perl-archive-zip/APKBUILD b/main/perl-archive-zip/APKBUILD index 36ef5b406a..d47d98b473 100644 --- a/main/perl-archive-zip/APKBUILD +++ b/main/perl-archive-zip/APKBUILD @@ -1,32 +1,46 @@ # Contributor: Leonardo Arena # Maintainer: Leonardo Arena pkgname=perl-archive-zip -_realname=Archive-Zip +_pkgname=Archive-Zip pkgver=1.61 -pkgrel=0 +pkgrel=1 pkgdesc="Provide a perl interface to ZIP archive files." url="http://search.cpan.org/dist/Archive-Zip/" arch="noarch" license="GPL PerlArtistic" depends="perl" makedepends="perl-dev" -install= +checkdepends="perl-test-mockmodule perl-super perl-sub-identify perl-test-simple + zip" subpackages="$pkgname-doc" -source="http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/$_realname-$pkgver.tar.gz" +source="http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + default_prepare + cd "$builddir" + export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + # FIXME remove failing tests + rm t/25_traversal.t +} -builddir="$srcdir/$_realname-$pkgver" build() { cd "$builddir" + export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 +check() { + cd "$builddir" + make test } package() { 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="28b7b8d3f38b36324c49668bb6b359a66f55cc611ca8f341e8f5045feffa23dd442d2ff130fa999e969bbabfe9b26c21bdf16463c9d52744b2c36babde866a8e Archive-Zip-1.61.tar.gz" -- cgit v1.2.3