summaryrefslogtreecommitdiff
path: root/perl-test-cpan-meta/PKGBUILD
blob: 8a95b1a6e106c9b802ae6b60f734c0a9c6d99a2b (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
72
73
# Maintainer: Erich Eckner <arch at eckner dot net>
# Generator : neuesPerlPaket (a1a5dc345ce385b4ecec6b807bdae9e3db0bf8d9d15d59331768c694d024731261eabbee3bb7e909052aabe8ad80ca6e8b34044981b6a349248d41ca327ecfcb)

pkgname='perl-test-cpan-meta'
pkgver='0.25'
pkgrel='4'
pkgdesc='Validate your CPAN META.json files'
arch=('x86_64' 'i686')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
provides=(
  'perl-test-cpan-meta-version=0.25')
depends=(
  'perl>=5.6.0'
  'perl-cpan-meta>=0.02'
  'perl-test-simple')
makedepends=(
  'perl-io'
  'perl-test-simple>=0.70')
optdepends=(
  'perl-test-pod>=1.00'
  'perl-test-pod-coverage>=0.08')
url='https://metacpan.org/release/Test-CPAN-Meta'
_distdir="Test-CPAN-Meta-${pkgver}"
source=("https://cpan.metacpan.org/authors/id/B/BA/BARBIE/${_distdir}.tar.gz")
sha512sums=('60a3414e1e0f9aaa1a9459aedd76a6d937742a4197d0d5ce9330348138997d372ca3f454c262fb6dd757699168aa7d1c2653c4066060c9c5685a6fe407260580')

build(){
  cd "${srcdir}/${_distdir}"
  
  # Setting these env variables overwrites any command-line-options we don't want...
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='${pkgdir}'" \
    PERL_MB_OPT="--installdirs vendor --destdir '${pkgdir}'" \
    MODULEBUILDRC=/dev/null

  # If using Makefile.PL
  if [ -r Makefile.PL ]; then
    perl Makefile.PL
    make
  # If using Build.PL
  elif [ -r Build.PL ]; then
    perl Build.PL
    perl Build
  fi
}

check(){
  cd "${srcdir}/${_distdir}"

  # If using Makefile.PL
  if [ -r Makefile.PL ]; then
    make test
  # If using Build.PL
  elif [ -r Build.PL ]; then
    perl Build test
  fi
}

package(){
  cd "${srcdir}/${_distdir}"
  
  # If using Makefile.PL
  if [ -r Makefile.PL ]; then
    make install
  # If using Build.PL
  elif [ -r Build.PL ]; then
    perl Build install
  fi

  # remove perllocal.pod and .packlist
  find "${pkgdir}" -name .packlist -o -name perllocal.pod -delete
}