summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78f14159769b9b44f5356ba7616cb18416b4cfdd (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: Moritz Bunkus <moritz@bunkus.org>

pkgname='perl-data-page'
pkgver='2.03'
pkgrel='1'
pkgdesc="help when paging through sets of results"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-class-accessor-chained')
makedepends=('perl-test-exception')
url='https://metacpan.org/pod/Data::Page'
source=("https://cpan.metacpan.org/authors/id/E/ET/ETHER/Data-Page-${pkgver}.tar.gz")
sha512sums=('5c0c411e8b03163b2b88b7ab6432def0ddcce48987e98868897e89d0220665537f23d9a56b6d544a5c6fb67f615a2db582764ebcaa612cb2a8906ba660fc3c59')

prepare_environment() {
  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
  cd "${srcdir}/Data-Page-${pkgver}"
}

build() {
  prepare_environment
  /usr/bin/perl Makefile.PL
  make
}

check() {
  prepare_environment
  make test
}

package() {
  prepare_environment
  make install
  find "$pkgdir" "(" -name .packlist -o -name perllocal.pod ")" -delete
}