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

_realname=Digest-MD4
pkgname=perl-${_realname}
pkgver=1.9
pkgrel=6
pkgdesc="Perl Module: Perl interface to the MD4 Algorithm."
arch=('i686' 'x86_64')
license=('PerlArtistic')
url="https://metacpan.org/${_realname}/"
groups=('perl-modules')
makedepends=('perl-devel')
depends=('perl>=5.10.0') # 'perl-Digest-SHA1' in perl core now
options=(!emptydirs)
replaces=('Digest-MD4')
provides=('Digest-MD4')
source=(https://www.cpan.org/authors/id/M/MI/MIKEM/DigestMD4/${_realname}-${pkgver}.tar.gz)
sha256sums=('665110bba32470f398f311cd6462fd8975d7c83675ff674bc2f6c7b72b0caaa6')

build() {
  cd ${srcdir}/${_realname}-${pkgver}
  # install module in vendor directories.
  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}
}
