# Contributor: TBK <tbk@jjtc.eu>
pkgname=perl-lockfile-simple
_pkgreal=LockFile-Simple
__pkgreal=lockfile-simple
pkgver=0.208
pkgrel=0
pkgdesc="Simple file locking scheme"
url="http://search.cpan.org/dist/LockFile-Simple/"
arch="noarch"
license="GPL PerlArtistic"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/S/SC/SCHWIGON/$__pkgreal/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

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="a1234d11cdb7bb98bd3d6c2504697187f2f7979c7acd7cfb0398f358f390af7b5eb7d834e83c83b0515199ac8d9a306d7fcdc96df04b0513f821887ad49fd67e  LockFile-Simple-0.208.tar.gz"
