# Automatically generated by apkbuild-cpan, template 4
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-par-packer
# Very strict version requirement: rebuild whenever Perl's minor version changes
pkgver=1.063
pkgrel=1
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=PAR-Packer
pkgdesc="App::Packer::Backend interface, for generating stand-alone executables, perl scripts and PAR files"
url="https://metacpan.org/release/PAR-Packer/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl-archive-zip perl-par perl-module-scandeps perl-getopt-argvfile perl-par-dist"
makedepends="perl-dev"
checkdepends="perl-ipc-run3"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/PAR-Packer-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \
		INSTALLDIRS=vendor \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
7d40c36c4530e43552ada6276e1175633c8698402a2c3c2ac5403e0902892cfb2a7790c3823fea268c2e418bded6583039a693f71b40e281e1e15686d3ecd807  PAR-Packer-1.063.tar.gz
"
