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

_realname=Net-IP
pkgname=perl-${_realname}
pkgver=1.26
pkgrel=3
pkgdesc="Perl Module:  Easy manipulation of IPv4 and IPv6 addresses"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/dist/Net-IP"
msys2_references=(
  "purl: pkg:cpan/MANU/Net-IP"
)
groups=('perl-modules')
depends=('perl>=5.10.0')
options=(!emptydirs)
source=(https://www.cpan.org/authors/id/M/MA/MANU/${_realname}-${pkgver}.tar.gz)
sha256sums=('040f16f3066647d761b724a3b70754d28cbd1e6fe5ea01c63ed1cd857117d639')

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