summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-params-validate/PKGBUILD
blob: accfb83c9a31a0f922dd4e46f092c6c818753b5a (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
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-params-validate
pkgver=1.29
pkgrel=1
pkgdesc="Validate sub params against a spec"
arch=('x86_64')
url="http://search.cpan.org/dist/Params-Validate"
license=('GPL' 'PerlArtistic')
depends=('perl' 'perl-module-implementation')
makedepends=('perl-module-build')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/D/DR/DROLSKY/Params-Validate-${pkgver}.tar.gz")
sha256sums=('49a68dfb430bea028042479111d19068e08095e5a467e320b7ab7bde3d729733')

build() {
  cd  Params-Validate-${pkgver}
  perl ./Build.PL --installdirs=vendor
  ./Build
}
package() {
  cd  Params-Validate-${pkgver}
  ./Build install --destdir="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
	_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
	_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
	depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}