# Maintainer: Jeff Bilyk <jbilyk@gmail.com>
pkgname=perl-crypt-rijndael
_pkgreal=Crypt-Rijndael
pkgver=1.11
pkgrel=4
pkgdesc="Crypt::CBC compliant Rijndael encryption module"
url="http://search.cpan.org/dist/Crypt-Rijndael/"
arch="all"
license="LGPL-2.1"
cpandepends="perl-test-manifest"
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/B/BD/BDFOY/$_pkgreal-$pkgver.tar.gz
	use-stdint_h.patch"

_builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$_builddir"
	make && make test
}

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

md5sums="c26594420342f4ccddc535b878962db9  Crypt-Rijndael-1.11.tar.gz
d5dd40f32be1a088e787956c2251c8b8  use-stdint_h.patch"
sha256sums="8f8833bc8839e0d4aa3c26d86d2f39ceb9b13e52a9f5e4fd928da2e71989d3b4  Crypt-Rijndael-1.11.tar.gz
71328eea00aa2cbce45fe2b29c0af131205f034e5e62e353fdb8e144ea22fc8d  use-stdint_h.patch"
sha512sums="57a20811351e4376b10aed11fe6cb932575d2b5d0155d01780f69598b06b28e9eb3036ae322fbc844dd2dda37db2d02a61462caf5d5af5d6dd4ac585c348262a  Crypt-Rijndael-1.11.tar.gz
4f96e3f326c48bdca94aa721468f6c927a6af39ab9683bc69058a9330d733c96e656883890cf9f2c4588173784d248238dec82a49e8261c0cd9e1d794764d97e  use-stdint_h.patch"
