summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4d4a2543db8fc240f2b3ae6089725ed12557c656 (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
# Maintainer: Tiago "marmis" de Paula <tiagodepalves@gmail.com>
# Contributor: Tiago "marmis" de Paula <tiagodepalves@gmail.com>

pkgname=perl-string-license
pkgver=0.0.11
pkgrel=1
pkgdesc='Detect source code license statements in a text string'
arch=('any')
url="https://metacpan.org/dist/String-License"
license=('AGPL-3.0-or-later')
# See "prereqs" in https://metacpan.org/dist/String-License/source/Makefile.PL
makedepends=(
  ## configure::requires
  'perl-extutils-makemaker>=6.17'
)
optdepends=(
  ## runtime::recommends
  'perl-re-engine-re2: enable additional detections'
)
depends=(
  ## runtime::requires
  'perl-array-intspan'
  'perl-feature-compat-class>=0.07'
  'perl-scalar-list-utils>=1.45' # "List::Util"
  'perl-log-any'
  'perl-namespace-clean'
  'perl-path-tiny>=0.062'
  'perl>=5.20'
  'perl-regexp-pattern>=0.2.12'
  'perl-regexp-pattern-license>=3.4.0'
)
checkdepends=(
  ## test::recommends
  'perl-file-basedir'
  'perl-regexp-pattern-license>=3.9.0'
  'perl-software-license>=0.104006' # "Software::LicenseUtils"
  'perl-yaml-libyaml' # "YAML::XS"

  ## test::requires
  'perl-test2-suite>=0.000060' # "Test2::V0"
  'perl-test-without-module'
)
options=('!emptydirs' 'purge')
source=("https://cpan.metacpan.org/authors/id/J/JO/JONASS/String-License-v${pkgver}.tar.gz")
b2sums=('733af1f8edfc3ba402f475ada43435ec698b0f227543927efcd0dbeff10401869da418b8770e517d3380509e3ac8f27892ac4c1269df33b8420d8445c87cc2ce')

build() {
  cd "${srcdir}/String-License-v${pkgver}"

  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  perl Makefile.PL NO_PACKLIST=true NO_PERLLOCAL=true INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/String-License-v${pkgver}"

  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd "${srcdir}/String-License-v${pkgver}"

  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  make install DESTDIR="${pkgdir}"
}