apkbuild-cpan.in: Update licenses to spdx format and remove redundant directory change

This commit is contained in:
Timothy Legge 2019-04-22 16:16:31 +00:00 committed by Natanael Copa
parent 77746a0c3d
commit 29bf802907
1 changed files with 4 additions and 9 deletions

View File

@ -14,8 +14,9 @@ use Module::CoreList;
use JSON;
my $license_mappings = {
"perl_5" => "GPL PerlArtistic",
"artistic_2" => "Artistic-2",
"perl_5" => "GPL-1.0-or-later Artistic-1.0-Perl",
"artistic_2" => "Artistic-2.0",
"gpl_3" => "GPL-3.0-only",
};
my $package_mappings = {
@ -33,7 +34,7 @@ pkgrel=0
pkgdesc="Perl module for [% pkgreal %]"
url="https://metacpan.org/release/[% pkgreal %]/"
arch="noarch"
license="GPL PerlArtistic"
license="GPL-1.0-or-later Artistic-1.0-Perl"
cpandepends=""
cpanmakedepends=""
cpancheckdepends=""
@ -173,7 +174,6 @@ sub update_functions {
if (-e "$metaprefix/Build.PL" ) {
$build_func = <<'EOF';
build() {
cd "$builddir"
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
perl Build.PL installdirs=vendor
./Build
@ -181,21 +181,18 @@ build() {
EOF
$package_func = <<'EOF';
package() {
cd "$builddir"
./Build install destdir="$pkgdir"
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
EOF
$check_func = <<'EOF';
check() {
cd "$builddir"
./Build test
}
EOF
} else {
$build_func = <<'EOF';
build() {
cd "$builddir"
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
make
@ -203,14 +200,12 @@ build() {
EOF
$package_func = <<'EOF';
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
EOF
$check_func = <<'EOF';
check() {
cd "$builddir"
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
make test
}