mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 10:45:15 +03:00
88 lines
2.7 KiB
Text
88 lines
2.7 KiB
Text
# Automatically generated by apkbuild-cpan, template 3
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: rubicon <rubicon@mailo.com>
|
|
pkgname=perl-app-cpanminus
|
|
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
|
|
_pkgreal=App-cpanminus
|
|
pkgver=1.7046
|
|
pkgrel=1
|
|
pkgdesc="Get, unpack, build and install modules from CPAN"
|
|
url="https://metacpan.org/release/App-cpanminus/"
|
|
arch="noarch"
|
|
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
|
|
depends="perl wget"
|
|
options="net" # needed to ensure cpanminus is able to access CPAN
|
|
subpackages="$pkgname-doc $pkgname-https"
|
|
source="https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-$pkgver.tar.gz
|
|
app-cpanminus-https.patch
|
|
busybox-wget-compat.patch
|
|
cpanms
|
|
"
|
|
builddir="$srcdir/$_pkgreal-$pkgver"
|
|
_blibdir="$builddir/blib"
|
|
|
|
# secfixes:
|
|
# 1.7045-r0:
|
|
# - CVE-2020-16154
|
|
|
|
prepare() {
|
|
install -Dvm644 lib/App/cpanminus.pm \
|
|
lib/App/cpanminus/https.pm
|
|
install -Dvm644 lib/App/cpanminus/fatscript.pm \
|
|
-t lib/App/cpanminus/https/
|
|
|
|
default_prepare
|
|
}
|
|
|
|
build() {
|
|
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
|
|
|
|
# Generate manpage for cpanms
|
|
pod2man -u "$srcdir"/cpanms "$builddir"/cpanms.1
|
|
|
|
PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
|
|
make
|
|
|
|
install -Dvm755 "$srcdir"/cpanms -t "$_blibdir"/script/
|
|
install -Dvm644 "$builddir"/cpanms.1 -t "$_blibdir"/man1/
|
|
}
|
|
|
|
check() {
|
|
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
|
|
make test
|
|
|
|
msg "Testing cpanm with GNU wget"
|
|
perl -I "$_blibdir"/lib \
|
|
"$_blibdir"/script/cpanm \
|
|
--verbose --no-lwp \
|
|
--from https://cpan.metacpan.org \
|
|
--showdeps App::cpanminus
|
|
|
|
msg "Testing cpanms with Busybox wget"
|
|
ln -sv "$(which busybox)" "$srcdir"/wget
|
|
export PATH="$srcdir:$PATH"
|
|
perl -I "$_blibdir"/lib \
|
|
"$_blibdir"/script/cpanms \
|
|
--verbose --no-lwp \
|
|
--showdeps App::cpanminus
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
|
|
}
|
|
|
|
https() {
|
|
pkgdesc="$pkgdesc via HTTPS"
|
|
depends="perl ssl_client ca-certificates-bundle"
|
|
|
|
amove usr/bin/cpanms
|
|
amove usr/share/perl5/vendor_perl/App/cpanminus/https*
|
|
}
|
|
|
|
sha512sums="
|
|
ced5f264979eb50cc33ac566c0242998c9b9c158ba435b9a180810f58eaa0b28d0de70312ade10df0ee3808369423f7baa029f2be740461d20a695e5e24d0d9b App-cpanminus-1.7046.tar.gz
|
|
cb1b97973aca4afbc460589fe97635e6d1f33853037dbe7348935cd71319f92a80299684591f1eb640aeedfdc5c90706fbf2d834cbf1dace80d0fa6052620632 app-cpanminus-https.patch
|
|
ccdc214d914197f5336c93faa0e9db12b62c026c3fee5e699a2cec7ea7a6d14f2becb9d8777f165de18200c50d85109bc14f83539d52e4dd8bca45b072097f81 busybox-wget-compat.patch
|
|
f5bddb41b2192b43ddf8565a7ff9549ae8f8c9779c1fd36a80010dae9b130d203c9c66207c0045f78140167c3384d62c534a7e05849a912819d0d50c5f174327 cpanms
|
|
"
|