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

_realname=Net-DNS
pkgname=perl-${_realname}
pkgver=1.53
pkgrel=1
pkgdesc="Perl Module: Interface to the DNS resolver."
arch=('i686' 'x86_64')
license=('spdx:MIT')
url="https://metacpan.org/dist/Net-DNS"
msys2_references=(
  'archlinux: perl-net-dns'
  'cygwin: perl-Net-DNS'
  'purl: pkg:cpan/NLNETLABS/Net-DNS'
)
groups=('perl-modules')
depends=('perl-Digest-HMAC' 'perl-Net-IP' 'perl')
makedepends=('make' 'gcc')
checkdepends=('perl-Test-Pod')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/N/NL/NLNETLABS/${_realname}-${pkgver}.tar.gz")
sha256sums=('04acb4f177d57c147dcedc4bd70e23806af3db75a532f46f95461b2bc9a94959')

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}"
}

