Conver hyphnes to underscores for version macros.

Hyphens cannot be part of macro names.

Also please note that the `%{gsub:...}` macro is available since RPM
4.19+. Lua would need to be used for older RPM:

https://github.com/rpm-software-management/rpm/pull/2181
This commit is contained in:
Vít Ondruch 2023-09-25 15:04:22 +02:00
commit e52d9f552d

View file

@ -9,9 +9,10 @@
# Prints gem_name-version string, by default joining %gem_name, %version and
# %prerelease macros. When [custom_gem_name] is provided, the
# custom_gem_name is joined with %custom_gem_name_version macro which needs
# to be predegined.
# to be predefined. Please note that for the version macros are the dashes
# replaced by underscores.
#
%gem_name_version() %{?1}%{!?1:%{gem_name}}-%{?1:%{expand:%{%{1}_version}}}%{!?1:%{version}}%{?prerelease}
%gem_name_version() %{?1}%{!?1:%{gem_name}}-%{?1:%{expand:%{%{gsub %{1} - _}_version}}}%{!?1:%{version}}%{?prerelease}
# Common gem locations and files.
#