# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-linux-inotify2
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Linux-Inotify2
pkgver=2.3
pkgrel=3
pkgdesc="scalable directory/file change notification"
url="https://metacpan.org/release/Linux-Inotify2/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-common-sense"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Linux-Inotify2-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

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

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

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

sha512sums="
8e0f1346c3b2c5af0b401d45973bd771d31263520942a0a9dbf75c4743cf677661996fd8ba5d532a2376bff92bb4fe136bc3cad196a9b29de0d503f3eac79877  Linux-Inotify2-2.3.tar.gz
"
