aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-test-mockmodule/APKBUILD
blob: f17553061d1c7feab9b910e2cb48bb43c050457b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-test-mockmodule
_pkgname=Test-MockModule
pkgver=0.170.0
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 OR Artistic-1.0-Perl"
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-v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-v$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="e62f79eb5c737838a0276bb1de5301e3f2eceef4f9b80fde0678e16490419f2d02afd24ab292e938b923a7d214e3aa60e73baf0d17da7047ca37064111c3ff79  Test-MockModule-v0.170.0.tar.gz"