# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-file-homedir
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=File-HomeDir
pkgver=1.006
pkgrel=2
pkgdesc="Find your home and other directories on any platform"
url="https://metacpan.org/release/File-HomeDir/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-file-which"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-HomeDir-$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
	make
}

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

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

sha512sums="
1ea90d68ed059ef5e890f6afb1280673dd5a597956f282c4ae8b4471c1751aa3cb2fcbe9caa6b2976937d11fd7233aa85a2dea611f87c79e0ddd1a501ceb890d  File-HomeDir-1.006.tar.gz
"
