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

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

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

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

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