diff options
author | David Greaves <david@dgreaves.com> | 2011-01-21 15:36:11 +0000 |
---|---|---|
committer | Martin Mohring <martin.mohring@5edatasoft.com> | 2011-01-28 18:16:55 +0100 |
commit | f50e4137d57fdf618fa5d80995ec02266fc8eadb (patch) | |
tree | ca2ba62e9678b71f20458032028f7b16b681341a /substitutedeps | |
parent | 85b3146400da1486da5d0d58d63d827ca2bca2af (diff) |
Support the <SPEC_REL> macro. This allows user values in the Release to be combined with <CI_CNT> etc
Signed-off-by: Martin Mohring <martin.mohring@5edatasoft.com>
Diffstat (limited to 'substitutedeps')
-rwxr-xr-x | substitutedeps | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/substitutedeps b/substitutedeps index bf9815b..32d1338 100755 --- a/substitutedeps +++ b/substitutedeps @@ -113,7 +113,8 @@ for my $line (@$xspec) { } } - if ($line =~ /^Release:/i) { + if ($line =~ /^Release:(.*)\s*$/i) { + my $spec_rel = $1; # User-provided value my $oldl = $line; if (defined $release) { if (!($line =~ s/<RELEASE\d*>/$release/g)) { @@ -132,11 +133,13 @@ for my $line (@$xspec) { $line =~ s/^(Release:\s*).*/$1$release/i; } } + $line =~ s/<SPEC_REL>/$spec_rel/; } else { # remove macros, as rpm doesn't like them $line =~ s/<RELEASE\d*>/0/; $line =~ s/<CI_CNT>/0/; $line =~ s/<B_CNT>/0/; + $line =~ s/<SPEC_REL>/0/; } # this is to be compatible to legacy autobuild. # you can specify a releaseprg in the project configuration, |