# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-mailtools
pkgver=2.22
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://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MailTools-$pkgver.tar.gz")
sha512sums=('5bab5af263cbbf1483ebb210086d101ac1d4517dcb30aaba8124a2cc71e3667c32ca19fc2bc169cd646af1a6bb4f7afee84535d1a93668658e1d74f4dc70c3e0')

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

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

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