blob: 35160eb98548d72281c79576658aa9901a8d62fb (
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
|
# CPAN Name : Net-RawIP
# Contributor: Anonymous
pkgname=perl-net-rawip
_cpanname='Net-RawIP'
pkgver=0.25
pkgrel=14.4
pkgdesc="Perl extension to manipulate raw IP packets with interface to B<libpcap>"
arch=('i686' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('libpcap>=1.3.0' 'perl')
makedepends=()
url='http://search.cpan.org/dist/Net-RawIP'
source=("http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/${_cpanname}-${pkgver}.tar.gz" fixes.patch)
sha512sums=('c48c77389db9dc8d5c64d67e5c62bac5e3314dbc36bcfa51aa20d07224492edaa65f5c71d47ca0b804ac62b1b02387e172cd3561eadaa3a1a8040968b182b3ca')
prepare() {
cd ${_cpanname}-${pkgver}
patch -Np2 -b -z .orig <../fixes.patch
}
build() {
cd ${_cpanname}-${pkgver}
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make
}
check() {
cd ${_cpanname}-${pkgver}
PERL_MM_USE_DEFAULT=1
make test
}
_perl_depends() {
# 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;
}
package() {
cd ${_cpanname}-${pkgver}
make install DESTDIR="$pkgdir"
find "$pkgdir" -name '.packlist' -o -name '*.pod' -delete
_perl_depends
}
sha512sums=('c48c77389db9dc8d5c64d67e5c62bac5e3314dbc36bcfa51aa20d07224492edaa65f5c71d47ca0b804ac62b1b02387e172cd3561eadaa3a1a8040968b182b3ca'
'a87c4fe0552e95d8a331c75036bd1fc8f2359ead8a4ce75529af0f9668729699165acf8bf8b57cd347d571b9f1545f58d82cbfbf50920aea8cfb95c4649410a3')
|