# Description: Perl interface to Bzip2 compression library
# URL: https://metacpan.org/release/Compress-Bzip2
# Maintainer: John McQuah, jmcquah at disroot dot org

name=p5-compress-bzip2
_author=RURBAN
version=2.28
release=1
source=(https://cpan.metacpan.org/authors/id/${_author::1}/${_author::2}/$_author/Compress-Bzip2-$version.tar.gz)

build() {
	cd Compress-Bzip2-$version

	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
	make DESTDIR="$PKG" install

	find $PKG \( -name '.packlist' -o -name '*.pod' \) -delete
	find $PKG -depth -empty -delete

	# Fix perms
        find $PKG -type f -a ! -perm -u+w -exec chmod u+w '{}' +
}
