summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bb630ca3032dbc3dc1756680479d756e00f9179b (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
# Contributor: John D Jones III AKA jnbek <jnbek1972 -_AT_- g m a i l -_Dot_- com>
# Generator  : CPANPLUS::Dist::Arch 1.30

_distname=Perl-Critic
pkgname=perl-critic
pkgver=1.132
pkgrel=1
pkgdesc="Critique Perl source code for best-practices."
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
# https://github.com/Perl-Critic/Perl-Critic/blob/dev/inc/Perl/Critic/BuildUtilities.pm
depends=(
  'perl-module-build'
  'perl-b-keywords>=1.05'
  'perl-config-tiny'
  'perl-exception-class>=1.23'
  'perl-file-homedir'
  'perl-file-which'
  'perl-io-string'
  'perl-list-moreutils>=0.19'
  'perl-module-pluggable>=3.1'
  'perl-ppi>=1.224'
  'perl-ppix-quotelike'
  'perl-ppix-regexp>=0.027'
  'perl-ppix-utilities>=1.001'
  'perl-tidy'
  'perl-pod-spell'
  'perl-readonly>=2.00'
  'perl-string-format>=1.13'
  'perl-task-weaken'
)
makedepends=()
checkdepends=('perl-test-deep')
url='https://metacpan.org/release/Perl-Critic'
source=("https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/$_distname-$pkgver.tar.gz")
sha512sums=('489d551b4913071a9001e8476425079b3aeef44838feff622edfdb64ca09f62b569f5338d2e1982d3ccd3fdb8f30caf077ceac5ec1beebafbde7a01d6deed890')

build() {
  ( 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/$_distname-$pkgver"
    /usr/bin/perl Build.PL
    /usr/bin/perl Build
  )
}

check() {
  cd "$srcdir/$_distname-$pkgver"
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    /usr/bin/perl Build test
  )
}

package() {
  cd "$srcdir/$_distname-$pkgver"
  /usr/bin/perl Build install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et: