summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-params-classify/PKGBUILD
blob: caa6278888f3752865321005e04d12802372d037 (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
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-params-classify
pkgver=0.013
pkgrel=10
pkgdesc="argument type classification"
arch=(x86_64)
license=('PerlArtistic')
url="http://search.cpan.org/~zefram/Params-Classify"
options=(!emptydirs)
depends=('perl')
makedepends=('perl-module-build')
source=("http://search.cpan.org/CPAN/authors/id/Z/ZE/ZEFRAM/Params-Classify-$pkgver.tar.gz"
        'op-sibling-fixes.patch')
md5sums=('63d24fbec775472ada49d16bce4a9b1f'
         '6a115714a269b34decf42fc445a2d0e0')

prepare() {
  cd "$srcdir"/Params-Classify-$pkgver
  # https://rt.cpan.org/Public/Bug/Display.html?id=114490
  patch -Np1 -i ../op-sibling-fixes.patch
}

build() {
  cd "$srcdir"/Params-Classify-$pkgver
  perl Build.PL installdirs=vendor destdir="$pkgdir/"
  perl Build
}

package() {
  cd "$srcdir"/Params-Classify-$pkgver
  perl Build install
  find "$pkgdir" -name perllocal.pod -delete
  find "$pkgdir" -name .packlist -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;
}