# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-system-command
pkgver=1.122
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=System-Command
pkgdesc="Object for running system commands"
url="https://metacpan.org/release/System-Command/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
checkdepends="perl-test-command perl-test-output"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/B/BO/BOOK/System-Command-$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="
7b83909072509b06c580c00ef6e06d83e620fa3da84c308a3f8e301a5cec9c1d3b953d3e9e70d99123f19ac164d7156806d65f65a624f3575851481674d04378  System-Command-1.122.tar.gz
"
