# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-file-sharedir-install
_pkgreal=File-ShareDir-Install
pkgver=0.11
pkgrel=0
pkgdesc="Install shared files"
url="http://search.cpan.org/dist/File-ShareDir-Install/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends perl-module-build-tiny"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/$_pkgreal-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_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
}

sha512sums="6611f6c3221ec52db7582f30b2159dba22ca8d899666526c069298b3350ced9e3b46872baaceb30f7a27e3c744c929ca4967fa820d14bbfdb41e5ed5485a9f72  File-ShareDir-Install-0.11.tar.gz"
