# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>

pkgname=perl-file-share
pkgver=0.26
pkgrel=0
pkgdesc="Extend File::ShareDir to Local Libraries"
arch="noarch"
license="GPL-1.0-only"
depends="perl-file-sharedir"
url="https://metacpan.org/release/File-Share"
source="http://search.cpan.org/CPAN/authors/id/I/IN/INGY/File-Share-$pkgver.tar.gz"
subpackages="$pkgname-doc"
builddir="$srcdir"/File-Share-$pkgver

build() {
	export \
		PERL_MM_USE_DEFAULT=1 \
		PERL5LIB="" \
		PERL_AUTOINSTALL=--skipdeps \
		PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
		PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
		MODULEBUILDRC=/dev/null

	perl ./Makefile.PL
	make
}

check() {
	export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
	make test
}

package() {
	make install
	find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
sha512sums="
da0593a581976978890796a8c40bfe71580cee15ecc709b084deb569807f33be2f18d3841f725ec2b4692b9d2bbba0c18f483c19691a16d39ba22570a497b254  File-Share-0.26.tar.gz
"
