diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/perl-test-mockmodule/APKBUILD | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/main/perl-test-mockmodule/APKBUILD b/main/perl-test-mockmodule/APKBUILD new file mode 100644 index 0000000000..9e466cd422 --- /dev/null +++ b/main/perl-test-mockmodule/APKBUILD @@ -0,0 +1,41 @@ +# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> +pkgname=perl-test-mockmodule +_pkgname=Test-MockModule +pkgver=0.15 +pkgrel=0 +pkgdesc="Override subroutines in a module for unit testing" +url="https://metacpan.org/release/Test-MockModule" +arch="noarch" +license="GPL-1.0-or-later PerlArtistic" +depends="perl" +makedepends="perl-dev perl-module-build perl-test-warnings perl-super + perl-sub-identify" +subpackages="$pkgname-doc" +source="https://cpan.metacpan.org/authors/id/G/GF/GFRANKS/Test-MockModule-$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 Build.PL installdirs=vendor prefix=/usr +} + +build() { + cd "$builddir" + export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` + PERL_MM_USE_DEFAULT=1 perl Build +} + +check() { + cd "$builddir" + PERL_MM_USE_DEFAULT=1 perl Build test +} + +package() { + cd "$builddir" + PERL_MM_USE_DEFAULT=1 perl Build install destdir="$pkgdir" + find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete +} + +sha512sums="20f64f9984010ee0b3c26532a8835156b7cc8837e436c0785a2d3b7959cb01f07584b816d754da9f9205e457fe5d4a8316d984bf215d242000704fe0c52284a7 Test-MockModule-0.15.tar.gz" |