# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-timedate
_pkgreal=TimeDate
pkgver=2.30
pkgrel=1
pkgdesc="unknown"
url="http://search.cpan.org/dist/TimeDate/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
replaces=perl-time-date
provides="perl-time-date=$pkgver"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/$_pkgreal-$pkgver.tar.gz"

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

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 && make test
}

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

md5sums="b1d91153ac971347aee84292ed886c1c  TimeDate-2.30.tar.gz"
sha256sums="75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86  TimeDate-2.30.tar.gz"
sha512sums="c6aa7d57fbe82260c7455f74f6dfda55f7c93d7a75914bafb9d09ebfb83b5f57f6bc1e332ab0764d7688d857eb022b0f5e92cf5b685d809c63cdfa93a8d2c221  TimeDate-2.30.tar.gz"
