summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-proc-processtable/PKGBUILD
blob: 19211fad2cd11d688eb8a21eace948b1a127c807 (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: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-proc-processtable
pkgver=0.55
pkgrel=1
pkgdesc="Provides a consistent interface to process table information."
arch=('x86_64')
url="http://search.cpan.org/dist/Proc-ProcessTable/"
license=('PerlArtistic')
depends=('perl')
provides=('perl-proc-killall' 'perl-proc-killfam' 'perl-proc-processtable-process')
options=(!emptydirs)
source=("http://search.cpan.org/CPAN/authors/id/J/JW/JWB/Proc-ProcessTable-$pkgver.tar.gz")
sha512sums=('2af3860c6d48508aecd1d97d323ede21318b801873a24fbc4340fa5b526ad7d1c5b55c52044a73cc92e6c0f5dac612c21089bb8cbe4b1d779bb3eb9a7b87bed1')

build() {
  cd "$srcdir/Proc-ProcessTable-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "$srcdir/Proc-ProcessTable-$pkgver"
  make test
}

package() {
  cd "$srcdir/Proc-ProcessTable-$pkgver"

  make install DESTDIR="${pkgdir}"
  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;
}