aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-carp/APKBUILD
blob: 20a04b2c68f695fa0df2270d2c64dce1a4ec87ec (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
42
43
44
45
46
47
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-carp
_pkgreal=Carp
pkgver=1.50
pkgrel=0
pkgdesc="alternative warn and die for modules"
url="https://search.cpan.org/dist/Carp/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="https://search.cpan.org/CPAN/authors/id/X/XS/XSAWYERX/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

doc() {
	default_doc
	replaces="perl-doc"
}

sha512sums="624e5fe41492d1d5de840d56a648168f2e6066717efaa20d257b277219ea2cd3b73e5bc2bd46a3e37e060cb3e35b4cccc560bdd169c2e252e861d441e90df4b6  Carp-1.50.tar.gz"