# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-db
_realname=BerkeleyDB
pkgver=0.55
pkgrel=1
pkgdesc="Perl extension for Berkeley DB version 2, 3 or 4"
url="http://search.cpan.org/dist/BerkeleyDB/"
arch="all"
license="GPL PerlArtistic"
depends="perl"
makedepends="perl-dev db-dev"
install=
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/$_realname-$pkgver.tar.gz"

build() {
	cd "$srcdir/$_realname-$pkgver"

	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
	make || return 1
}

package() {
	cd "$srcdir/$_realname-$pkgver"
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

md5sums="7aa018597792a2f56e80f31d3fe76fa2  BerkeleyDB-0.55.tar.gz"
sha256sums="6f28e141c7e2fbc455621bc809d6e7d84a3640cc77568b07798ae3933107e44f  BerkeleyDB-0.55.tar.gz"
sha512sums="a9bee92b0168918eaf6fb38b7b66005cfbb360ce89a9ae9feeb022e3d27fa7e627412b5c19233840571ed60568729d4bd83d279f84a0c7db921b8eed9f73afea  BerkeleyDB-0.55.tar.gz"
