# Maintainer: Mark Sikora <marknsikora@gmail.com>

_realname=PerlIO-gzip
pkgname=perl-${_realname}
pkgver=0.20
pkgrel=6
pkgdesc="Perl extension to provide a PerlIO layer to gzip/gunzip"
arch=('i686' 'x86_64')
url="https://metacpan.org/release/PerlIO-gzip"
msys2_references=(
  'purl: pkg:cpan/NWCLARK/PerlIO-gzip'
)
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl' 'zlib')
makedepends=('perl-devel' 'zlib-devel' 'make' 'gcc')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/${_realname}-${pkgver}.tar.gz")
sha256sums=('4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5')

build() {
  cd ${_realname}-${pkgver}
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

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

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