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

_realname=MailTools
pkgname=perl-${_realname}
pkgver=2.22
pkgrel=1
pkgdesc="Various e-mail related modules"
arch=('any')
url="https://metacpan.org/release/MailTools"
msys2_references=(
  "purl: pkg:cpan/MARKOV/MailTools"
)
license=('PerlArtistic' 'GPL')
depends=('perl-TimeDate')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/M/MA/MARKOV/MailTools-$pkgver.tar.gz")
sha256sums=('3bf68bb212298fa699a52749dddff35583a74f36a92ca89c843b854f29d87c77')

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

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

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