# Maintainer: Peter Budai <peterbudai at hotmail dot com>

_realname=MIME-Charset
pkgname=perl-${_realname}
pkgver=1.013.1
pkgrel=1
pkgdesc="MIME::Charset - Charset Information for MIME"
arch=('any')
url="https://metacpan.org/${_realname}/"
msys2_references=(
  "purl: pkg:cpan/NEZUMI/MIME-Charset"
)
groups=("perl-modules")
license=('GPL' 'PerlArtistic')
depends=("perl")
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/N/NE/NEZUMI/${_realname}-${pkgver}.tar.gz)
sha256sums=('1bb7a6e0c0d251f23d6e60bf84c9adefc5b74eec58475bfee4d39107e60870f0')

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

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

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