# Automatically generated by apkbuild-cpan, template 1
# Contributor: Jean-Charles de Longueville <jch@hellea.eu>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-file-readbackwards
_pkgreal=File-ReadBackwards
pkgver=1.05
pkgrel=3
pkgdesc="Reading a file backwards"
url="http://search.cpan.org/dist/File-ReadBackwards/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/U/UR/URI/$_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="8e1eeeda0acfdc0b9e1f5234cac37348890fb962e5edd395804d6cf9ab2c221217e2714025303493cafde7ce77721e6c09b2b53825dadb978fafe68f6d7b8c20  File-ReadBackwards-1.05.tar.gz"
