summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-socket6/PKGBUILD
blob: dd303762214e528e50dbfb6f29b25f72b46a2304 (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
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Florian Pritz <bluewind@xinu.at>

pkgname=perl-socket6
pkgver=0.28
pkgrel=4
pkgdesc="A getaddrinfo/getnameinfo support module"
arch=('x86_64')
url='http://search.cpan.org/dist/Socket6'
license=('PerlArtistic' 'GPL')
depends=('perl')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/U/UM/UMEMOTO/Socket6-$pkgver.tar.gz)
sha1sums=('5903fbf53e0e25623bf71c252c3a073389686ed0')

build() {
  cd Socket6-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Socket6-$pkgver
  make test
}

package() {
  cd Socket6-$pkgver
  make DESTDIR="$pkgdir" install
# 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;
}