Expand variations for default_name

Signed-off-by: Troy Dawson <tdawson@redhat.com>
This commit is contained in:
Troy Dawson 2025-04-11 07:31:27 -07:00
parent 821d0da367
commit cac1fa2a3b

View File

@ -1,5 +1,11 @@
%if 0%{?eln}
%if %{defined eln}
%global default_name ELN
%elif %{defined epel} && %{defined centos}
%global default_name CentosStream-EPEL-%{?centos}
%elif %{defined centos}
%global default_name CentosStream-%{?centos}
%elif %{defined fedora}
%global default_name Fedora-%{?fedora}
%else
%global default_name Fedora
%endif
@ -32,11 +38,7 @@ Provides WSL specific configuration files and first-time setup script.
%prep
%if 0%{?fedora}
sed -i 's,$NAME,Fedora,' %{SOURCE3}
%else
sed -i 's,$NAME,ELN,' %{SOURCE3}
%endif
sed -i 's,$NAME,%{default_name},' %{SOURCE3}
%build