# Automatically generated by apkbuild-cpan, template 3 # Contributor: Jakub Jirutka # Maintainer: rubicon pkgname=perl-app-cpanminus #_pkgreal is used by apkbuild-cpan to find modules at MetaCpan _pkgreal=App-cpanminus pkgver=1.7047 pkgrel=0 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=" c58b58773b5cd06f346228af46136beffcf07cf49dd51c6d914e2fe4c2a592b5c94901510da8c7ff55795e6beb25bf5344ac798d817ab0a1f2450ff75cbaa17d App-cpanminus-1.7047.tar.gz 947530e269342427580be2f5700c6a86edbd8c5b51e54a1fb9244fe57f27e292e77d7535b7199a5f5e2d0406a25c7a567d7fef8e0fe772bed23d9b62cbb1a8c8 app-cpanminus-https.patch ccdc214d914197f5336c93faa0e9db12b62c026c3fee5e699a2cec7ea7a6d14f2becb9d8777f165de18200c50d85109bc14f83539d52e4dd8bca45b072097f81 busybox-wget-compat.patch f5bddb41b2192b43ddf8565a7ff9549ae8f8c9779c1fd36a80010dae9b130d203c9c66207c0045f78140167c3384d62c534a7e05849a912819d0d50c5f174327 cpanms "