# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
setvar pkgname = 'perl-test-mock-guard'
setvar _pkgname = 'Test-Mock-Guard'
setvar pkgver = '0.10'
setvar pkgrel = '0'
setvar pkgdesc = ""Simple mock test library using RAII""
setvar url = ""https://github.com/zigorou/p5-test-mock-guard""
setvar arch = ""noarch""
setvar license = ""PerlArtistic""
setvar makedepends = ""perl-dev perl-module-build perl-class-load""
setvar subpackages = ""$pkgname-doc""
setvar source = ""http://search.cpan.org/CPAN/authors/id/X/XA/XAICRON/$_pkgname-$pkgver.tar.gz""
setvar builddir = ""$srcdir/$_pkgname-$pkgver""

proc prepare {
	default_prepare || return 1
	cd $builddir
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL --installdirs=vendor || return 1
}

proc build {
	cd $builddir
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	./Build && ./Build test
}

proc package {
	cd $builddir
	./Build install --destdir="$pkgdir" || return 1
	find $pkgdir '(' -name perllocal.pod -o -name .packlist ')' -delete
}

setvar md5sums = ""b2866485cc29c787f85793279e2f2360  Test-Mock-Guard-0.10.tar.gz""
setvar sha256sums = ""7f228a63f8d6ceb92aa784080a13e85073121b2835eca06d794f9709950dbd3d  Test-Mock-Guard-0.10.tar.gz""
setvar sha512sums = ""17a8cbfea9e33a625ad5a33b40b5a799715d59b57eb4030a9d694fdd1e7361667f326888577291f0807852b86c04b97384ab8a48d95eb92158d35e14131068cc  Test-Mock-Guard-0.10.tar.gz""