# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+aur@gmail.com>

pkgname=perl-email-address-xs
pkgver=1.05
pkgrel=5
pkgdesc="RFC 2822 Address Parsing and Creation "
arch=('any')
url="https://search.cpan.org/dist/Email-Address-XS"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/P/PA/PALI/Email-Address-XS-$pkgver.tar.gz")
sha256sums=('1510b7f10d67201037cd50d22c9d6b26eeca55ededa4cdb46bbca27e59a4ea16')

build() {
  cd  "$srcdir"/Email-Address-XS-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/Email-Address-XS-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
