get and use pkgdesc from cpan api data if the module has no metadata files (returnes unknown)

This commit is contained in:
Timothy Legge 2019-03-22 01:18:47 +00:00 committed by Natanael Copa
parent 801578a06a
commit 629a780b1c

View File

@ -108,6 +108,7 @@ sub write_apkbuild {
pkgreal => $moddata->{distribution}, pkgreal => $moddata->{distribution},
pkgver => $moddata->{version}, pkgver => $moddata->{version},
source => $moddata->{download_url} =~ s/$moddata->{version}/\$pkgver/r, source => $moddata->{download_url} =~ s/$moddata->{version}/\$pkgver/r,
pkgdesc => $distdata->{abstract},
); );
$template =~ s/\[% (.*?) %\]/$repl{$1}/g; $template =~ s/\[% (.*?) %\]/$repl{$1}/g;
@ -262,7 +263,7 @@ sub do_depends {
say "CPAN check deps: $makedeps"; say "CPAN check deps: $makedeps";
my $text = read_file "APKBUILD"; my $text = read_file "APKBUILD";
if ($abstract) { if ($abstract && $abstract ne 'unknown') {
$text =~ s/^pkgdesc=\"([^\"]*)\"$/pkgdesc=\"$abstract\"/mg or $text =~ s/^pkgdesc=\"([^\"]*)\"$/pkgdesc=\"$abstract\"/mg or
die "Can't find cpandepends line in APKBUILD"; die "Can't find cpandepends line in APKBUILD";
} }