# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Net-DNS
pkgname=perl-${_realname}
pkgver=1.32
pkgrel=1
pkgdesc="Perl Module: Interface to the DNS resolver."
arch=('i686' 'x86_64')
license=('PerlArtistic')
url="https://metacpan.org/${_realname}/"
groups=('perl-modules')
depends=('perl-Digest-HMAC' 'perl-Net-IP' 'perl')
checkdepends=('perl-Test-Pod')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/N/NL/NLNETLABS/${_realname}-${pkgver}.tar.gz")
sha256sums=('b890a7b44d573f27cc713caadf1e12eaaa4478a6504d1157194df614316b5b50')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}

