blob: 65da779a54ccdd2e3514cb6660bc74948021925f (
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
53
54
55
56
57
58
59
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Manolis Tzanidakis
pkgname=perl-net-ssleay
_cpanname=Net-SSLeay
pkgver=1.85
pkgrel=1
pkgdesc='Perl extension for using OpenSSL'
url='https://search.cpan.org/dist/Net-SSLeay/'
arch=('x86_64')
license=('custom:BSD')
depends=('openssl')
makedepends=('chrpath')
replaces=('net-ssleay')
provides=('net-ssleay')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/M/MI/MIKEM/${_cpanname}-${pkgver}.tar.gz)
sha512sums=('74e0f2f56b707f1ff845c78c1fa7ce26a71b8f943bb99e994d4e065d1f42259fe4cd1a6a17d333459727534158f9541f116dbc8515122380807d9450b0faa26b')
prepare() {
cd ${_cpanname}-${pkgver}
sed -i \
-e "/\$opts->{optimize} = '-O2 -g';/d" \
inc/Module/Install/PRIVATE/Net/SSLeay.pm
}
build() {
cd ${_cpanname}-${pkgver}
export OPTIMIZE="${CFLAGS}"
export OPENSSL_PREFIX=/usr
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make
}
check() {
cd ${_cpanname}-${pkgver}
make test
}
package() {
cd ${_cpanname}-${pkgver}
make install DESTDIR="${pkgdir}"
install -Dm 644 README "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# strip rpath
find "${pkgdir}" -name '*.so' -exec chrpath -d '{}' \;
# 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;
}
# vim: ts=2 sw=2 et:
|