# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'perl-posix-strftime-compiler'
setvar _pkgreal = 'POSIX-strftime-Compiler'
setvar pkgver = '0.41'
setvar pkgrel = '0'
setvar pkgdesc = ""GNU C library compatible strftime for loggers and servers""
setvar url = ""http://search.cpan.org/dist/POSIX-strftime-Compiler/""
setvar arch = ""noarch""
setvar license = ""GPL PerlArtistic""
setvar cpandepends = """"
setvar cpanmakedepends = ""   ""
setvar depends = ""$cpandepends tzdata""
setvar makedepends = ""perl-dev $cpanmakedepends perl-module-build""
setvar subpackages = ""$pkgname-doc""
setvar source = ""http://search.cpan.org/CPAN/authors/id/K/KA/KAZEBURO/$_pkgreal-$pkgver.tar.gz
	musl-fix.patch
	""

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

proc prepare {
	cd $_builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags})
	perl Build.PL installdirs=vendor || return 1
}

proc build {
	cd $_builddir
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags})
	./Build && ./Build test
}

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

setvar md5sums = ""3cb849778e00f5d3894e7e78c2e629ce  POSIX-strftime-Compiler-0.41.tar.gz
d484ef159d6abdc6aa4d7dd0f19d54a8  musl-fix.patch""
setvar sha256sums = ""670b89e11500f3808c9e21b1c300089622f68906ff12b1cbfba8e30d3a1c3739  POSIX-strftime-Compiler-0.41.tar.gz
543a8537eae03003de95f035e67b7625005280c3df62557e885ea7a519583d3c  musl-fix.patch""
setvar sha512sums = ""b613de3fb332313318cca8a6c8912b64e9dac702d5681d252dc8eb919c7b102354ad25f60b537cdfa66203e01826b34a5a349a2fac856a6affb40d5f160725fe  POSIX-strftime-Compiler-0.41.tar.gz
b9615f0453548dab8d663abdb7fe5fd9a5a6db2fbbeb38de22c65859db5e7dcd90c46837297886737fda64a6d11bc4ab06ed51a45c2fccb9fcda5cf10abacd8b  musl-fix.patch""