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

_realname=MIME-Charset
pkgname=perl-${_realname}
pkgver=1.012.2
pkgrel=1
pkgdesc="MIME::Charset - Charset Information for MIME"
arch=('any')
url="https://metacpan.org/${_realname}/"
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=('878c779c0256c591666bd06c0cde4c0d7820eeeb98fd1183082aee9a1e7b1d13')

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