libspec.lib - Accept the rpm token %global which defines macros in global context

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2015-03-29 18:40:01 +02:00
parent 4f100fc519
commit faf2a81b00
3 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,12 @@
Changes in version 1.16.6
--- -- -- 2015 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* lib/libspec.lib - Davide Madrisan
Accept the rpm token %global which defines macros in global context.
-------------------------------------------------------------------------------
Changes in version 1.16.5 - "End-of-year" release
Tue Dec 30 2014 Madrisan <davide.madrisan(a)gmail.com>

6
NEWS
View File

@ -1,3 +1,9 @@
List of user visible changes in the release 1.16.6
--
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.5 - "End-of-year" release
-- Improvement

View File

@ -294,7 +294,7 @@ $FUNCNAME: conditional block (%end) [level#$ifexpr_level]"
%end)
notify.warning $"\`%end' found; should perhaps be \`%endif'"
;;
%define)
"%define"|"%global")
# note: we want to catch %define directives put in conditional blocks
# example: %define majversion <single_token>
let "level = 0"
@ -319,8 +319,8 @@ $FUNCNAME: conditional block (%end) [level#$ifexpr_level]"
case "${tok[*]}" in
%\(*\))
# it's something like:
# %define major_ver %(echo %version | cut -d. -f 1-2)
# %define glibver %(echo `rpm -q --queryformat '%{VERSION}' libglib`)
# %global major_ver %(echo %version | cut -d. -f 1-2)
# rpmvar_value[${#rpmvar_value[*]}]="\
#$( echo "${tok[*]}" | sed "s|%(\(.*\))|\1|" )"