# Automatically generated by apkbuild-cpan, template 2
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-time-timegm
_pkgreal=Time-timegm
pkgver=0.01
pkgrel=0
pkgdesc="a UTC version of C<mktime()>"
url="http://search.cpan.org/dist/Time-timegm/"
arch="all"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
cpancheckdepends=""
depends="$cpandepends perl-extutils-cchecker"
makedepends="perl-dev perl-module-build $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL installdirs=vendor || return 1
}

build() {
	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	./Build
}

package() {
	cd "$builddir"
	./Build install destdir="$pkgdir" || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

check() {
	cd "$builddir"
	./Build test
}

sha512sums="cd7cc8962ccfad353d290d4f5113c8dfe362fdaeb535b843b5007b3a89396ca48ff14a7eb040c14a52dfd0af5c243cdde7d6f5f100c12eb4d133a4de931dd42a  Time-timegm-0.01.tar.gz"
