summaryrefslogtreecommitdiff
path: root/perl-podlinkcheck/PKGBUILD
blob: aba9859486eeae656fb0b857654255677dafeafc (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: Erich Eckner <arch at eckner dot net>
# Generator : neuesPerlPaket (bdf93f5ec640b26ea19b184fa40191df46ec6820b752b3b12d27556efe3f22712ce5b1bd64aa62ae4e0ef7c7e2f37b46d0f6669245e049fc1bbaf487d3eb2aae)

pkgname='perl-podlinkcheck'
pkgver='15'
pkgrel='2'
pkgdesc='Check POD  link references.'
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
provides=(
  'perl-app-podlinkcheck=15'
  'perl-app-podlinkcheck-parselinks=15'
  'perl-app-podlinkcheck-parsesections=15'
)
optdepends=(
  'perl-pod-simple>=3.24'
  'perl-sort-key-natural'
)
depends=(
  'perl>=5.6.0'
  'perl-constant-defer'
  'perl-file-find-iterator'
  'perl-file-homedir'
  'perl-file-temp'
  'perl-ipc-run'
  'perl-libintl-perl'
  'perl-pathtools>=0.8'
  'perl-pod-parser'
  'perl-pod-simple'
  'perl-scalar-list-utils'
  'perl-search-dict'
)
makedepends=(
  'perl-extutils-makemaker'
  'perl-test-simple'
)
url='https://metacpan.org/release/podlinkcheck'
_distdir="podlinkcheck-${pkgver}"
source=("https://cpan.metacpan.org/authors/id/K/KR/KRYDE/${_distdir}.tar.gz")
sha512sums=('d6294f099395a7ae1a08987e10f7f297c38c7561f2c1102151d8befb42f9978729571712584816473cb8be872928abf819648d0916b8efc9d9adc328b5d932be')

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
}