# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-compress-raw-zlib
_realname=Compress-Raw-Zlib
pkgver=2.076
pkgrel=0
pkgdesc="Perl low-level interface to zlib compression library"
url="http://search.cpan.org/dist/Compress-Raw-Zlib/"
arch="all"
license="GPL PerlArtistic"
depends="perl"
makedepends="perl-dev"
source="http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/${_realname}-${pkgver}.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

build() {
	cd $builddir
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make test
}

package() {
	cd $builddir
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete

	# man pages are already provided by perl-doc
	rm -rf "$pkgdir"/usr/share/man
}

sha512sums="f1b9aef6174aef0546a9066a0136fc5aa11e7400c370e853e6fdf11f8de9fca3b98102745da96c06bf4942c3f86d8e0c820a00f53b3f3c1764d8ecad33772544  Compress-Raw-Zlib-2.076.tar.gz"
