Skip to content

Commit

Permalink
Merge pull request #283 from marcus-h/icon_tag
Browse files Browse the repository at this point in the history
Consider the "Icon" tag in Rpm::parse
  • Loading branch information
adrianschroeter committed Aug 8, 2016
2 parents 80803e2 + da4c42f commit a750173
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Build/Rpm.pm
Expand Up @@ -464,8 +464,6 @@ reexpand:
if ($line =~ /^(Name|Version|Disttag|Release)\s*:\s*(\S+)/i) {
$ret->{lc $1} = $2;
$macros{lc $1} = $2;
} elsif ($line =~ /^(Source\d*|Patch\d*|Url)\s*:\s*(\S+)/i) {
$ret->{lc $1} = $2;
} elsif ($line =~ /^ExclusiveArch\s*:\s*(.*)/i) {
$exclarch ||= [];
push @$exclarch, split(' ', $1);
Expand Down Expand Up @@ -557,6 +555,16 @@ reexpand:
}
}
next;
} elsif ($preamble && $line =~ /^(Source\d*|Patch\d*|Url|Icon)\s*:\s*(\S+)/i) {
my ($tag, $val) = (lc($1), $2);
# associate url and icon tags with the corresponding subpackage
$tag .= scalar @subpacks if ($tag eq 'url' || $tag eq 'icon') && @subpacks;
if ($tag =~ /icon/) {
# there can be a gif and xpm icon
push @{$ret->{$tag}}, $val;
} else {
$ret->{$tag} = $val;
}
}

if ($line =~ /^\s*%package\s+(-n\s+)?(\S+)/) {
Expand Down

0 comments on commit a750173

Please sign in to comment.