import python-rpm-macros-3.9-54.el9

i9c-beta changed/i9c-beta/python-rpm-macros-3.9-54.el9
MSVSphere Packaging Team 3 months ago
parent 2df794f878
commit c0f17387ea
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

@ -194,15 +194,19 @@
end end
} }
%python_extras_subpkg(n:i:f:F) %{expand:%{lua: %python_extras_subpkg(n:i:f:FaA) %{expand:%{lua:
local option_n = '-n (name of the base package)' local option_n = '-n (name of the base package)'
local option_i = '-i (buildroot path to metadata)' local option_i = '-i (buildroot path to metadata)'
local option_f = '-f (builddir path to a filelist)' local option_f = '-f (builddir path to a filelist)'
local option_F = '-F (skip %%files section)' local option_F = '-F (skip %%files section)'
local option_a = '-a (insert BuildArch: noarch)'
local option_A = '-A (do not insert BuildArch: noarch (default))'
local value_n = rpm.expand('%{-n*}') local value_n = rpm.expand('%{-n*}')
local value_i = rpm.expand('%{-i*}') local value_i = rpm.expand('%{-i*}')
local value_f = rpm.expand('%{-f*}') local value_f = rpm.expand('%{-f*}')
local value_F = rpm.expand('%{-F}') local value_F = rpm.expand('%{-F}')
local value_a = rpm.expand('%{-a}')
local value_A = rpm.expand('%{-A}')
local args = rpm.expand('%{*}') local args = rpm.expand('%{*}')
if value_n == '' then if value_n == '' then
rpm.expand('%{error:%%%0: missing option ' .. option_n .. '}') rpm.expand('%{error:%%%0: missing option ' .. option_n .. '}')
@ -219,6 +223,9 @@
if value_f ~= '' and value_F ~= '' then if value_f ~= '' and value_F ~= '' then
rpm.expand('%{error:%%%0: simultaneous ' .. option_f .. ' and ' .. option_F .. ' options are not possible}') rpm.expand('%{error:%%%0: simultaneous ' .. option_f .. ' and ' .. option_F .. ' options are not possible}')
end end
if value_a ~= '' and value_A ~= '' then
rpm.expand('%{error:%%%0: simultaneous ' .. option_a .. ' and ' .. option_A .. ' options are not possible}')
end
if args == '' then if args == '' then
rpm.expand('%{error:%%%0 requires at least one argument with "extras" name}') rpm.expand('%{error:%%%0 requires at least one argument with "extras" name}')
end end
@ -246,7 +253,11 @@
elseif value_f ~= '' then elseif value_f ~= '' then
files = '%files -n ' .. rpmname .. ' -f ' .. value_f files = '%files -n ' .. rpmname .. ' -f ' .. value_f
end end
for i, line in ipairs({pkgdef, summary, requires, description, files, ''}) do local tags = summary .. '\\\n' .. requires
if value_a ~= '' then
tags = tags .. '\\\nBuildArch: noarch'
end
for i, line in ipairs({pkgdef, tags, description, files, ''}) do
print(line .. '\\\n') print(line .. '\\\n')
end end
end end

@ -1,6 +1,6 @@
Name: python-rpm-macros Name: python-rpm-macros
Version: 3.9 Version: 3.9
Release: 53%{?dist} Release: 54%{?dist}
Summary: The common Python RPM macros Summary: The common Python RPM macros
URL: https://src.fedoraproject.org/rpms/python-rpm-macros/ URL: https://src.fedoraproject.org/rpms/python-rpm-macros/
@ -126,6 +126,9 @@ install -m 644 pathfix.py %{buildroot}%{_rpmconfigdir}/redhat/
%changelog %changelog
* Tue Jun 25 2024 Cristian Le <fedora@lecris.me> - 3.9-54
- %%python_extras_subpkg: Add option -a to include BuildArch: noarch
* Thu Mar 28 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.9-53 * Thu Mar 28 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.9-53
- Rebuilt for MSVSphere 9.4 beta - Rebuilt for MSVSphere 9.4 beta

Loading…
Cancel
Save