# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-mail-dkim
_realname=Mail-DKIM
pkgver=0.50
pkgrel=1
pkgdesc="Signs/verifies Internet mail with DKIM/DomainKey signatures"
url="http://search.cpan.org/~jaslong/Mail-DKIM/"
arch="noarch"
license="Artistic-Perl-1.0 GPL+"
depends="perl perl-net-dns perl-net-ip perl-mailtools perl-crypt-openssl-rsa
	perl-yaml-xs perl-net-dns-resolver-mock"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/M/MB/MBRADSHAW/$_realname-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

prepare() {
	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
}

build() {
	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make || return 1
}

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

check() {
	cd "$builddir"
	make test
}

sha512sums="bdb7b8d6220eb8cd062bbe694b9bce6b5b448a012579388b5d83ed37b92502ce3399f854d6d5e0c7d5070e0aa1834a523254f6c00c2db36760f2013c27b1496a  Mail-DKIM-0.50.tar.gz"
