diff options
author | Timothy Legge <timlegge@gmail.com> | 2019-03-22 01:18:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-04-03 16:07:03 +0000 |
commit | 629a780b1c1c09c500341ea7b706dc48751760dd (patch) | |
tree | df5da9eed3dc0e4460d3a23dde15515e785a8514 | |
parent | 801578a06a0ee602f3533bb0184c0b58b96e3fa1 (diff) | |
download | abuild-629a780b1c1c09c500341ea7b706dc48751760dd.tar.gz abuild-629a780b1c1c09c500341ea7b706dc48751760dd.tar.bz2 abuild-629a780b1c1c09c500341ea7b706dc48751760dd.tar.xz abuild-629a780b1c1c09c500341ea7b706dc48751760dd.zip |
get and use pkgdesc from cpan api data if the module has no metadata files (returnes unknown)
-rw-r--r-- | apkbuild-cpan.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index b2699cb..63b49b2 100644 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -108,6 +108,7 @@ sub write_apkbuild { pkgreal => $moddata->{distribution}, pkgver => $moddata->{version}, source => $moddata->{download_url} =~ s/$moddata->{version}/\$pkgver/r, + pkgdesc => $distdata->{abstract}, ); $template =~ s/\[% (.*?) %\]/$repl{$1}/g; @@ -262,7 +263,7 @@ sub do_depends { say "CPAN check deps: $makedeps"; my $text = read_file "APKBUILD"; - if ($abstract) { + if ($abstract && $abstract ne 'unknown') { $text =~ s/^pkgdesc=\"([^\"]*)\"$/pkgdesc=\"$abstract\"/mg or die "Can't find cpandepends line in APKBUILD"; } |