summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 91907fbf87909747a459237872d16965461d9fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Yardena Cohen <yardenack at gmail dot com>

cpaname=Math-Prime-XS
cpanauthor=KRYDE
pkgname=perl-math-prime-xs
pkgver=0.27
pkgrel=1
pkgdesc="Detect and calculate prime numbers with deterministic tests"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-boolean' 'perl-params-validate')
url=http://search.cpan.org/dist/${cpaname}
source=("http://search.cpan.org/CPAN/authors/id/${cpanauthor::1}/${cpanauthor::2}/${cpanauthor}/${cpaname}-${pkgver}.tar.gz")
md5sums=('70a40bcf0d6d1a88375c884aa3139207')
sha256sums=('19f7e9b95fbb29e4d103bc454325143674852e38435667dfe998629f40d13af8')
sha512sums=('0ee15e765e660d4e989bee726530d04e34d40289dc6945bc9aed885abf1957df417ffc04449adee0ca6b1bab127e4e9e0bffd562f669ca704b7acb8a481ed42b')

build() {
  cd "${srcdir}/${cpaname}-${pkgver}"
  export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
         PERL_AUTOINSTALL=--skipdeps                            \
         PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
         PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
         MODULEBUILDRC=/dev/null
  perl Makefile.PL
  make
}

check() {
  cd "${srcdir}/${cpaname}-${pkgver}"
  export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
  make test
}

package() {
  cd "${srcdir}/${cpaname}-${pkgver}"
  make install INSTALLDIRS=vendor DESTDIR="${pkgdir}"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}