diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-25 03:16:35 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-25 03:16:35 +0000 |
commit | 82da4aaf5636a13119dcd387c7dafaaf47cc9c28 (patch) | |
tree | c9e5b62552367f2fb373bb073766dadfacbb4d53 | |
parent | 34d0ba766b3725539dc1199fc145cf704462d5a2 (diff) |
automatic import of openEuler-rpm-config
-rw-r--r-- | macros | 25 | ||||
-rw-r--r-- | macros.extension | 24 | ||||
-rw-r--r-- | openEuler-rpm-config.spec | 10 |
3 files changed, 31 insertions, 28 deletions
@@ -106,31 +106,6 @@ %[0%{?_auto_set_build_cc} ? "%{set_build_cc}" : ""] \ %[0%{?_auto_set_build_flags} ? "%{set_build_flags}" : ""] -# Internal-only. Do not use. Expand a variable and strip the flags -# not suitable to extension builders. -%__extension_strip_flags() %{lua: ---the only argument to this macro is the "name" of the flags we strip (e.g. cflags, ldflags, etc.) -local name = rpm.expand("%{1}") ---store all the individual flags in a variable as a continuous string -local flags = rpm.expand("%{build_" .. name .. "}") ---create an empty table for the minimal set of flags we wanna preserve -local stripped_flags = { } ---iterate over the individual flags and store the ones we want in the table as unique keys -for flag in flags:gmatch("%S+") do - if flag:find("^%-fexceptions") or flag:find("^%-fcf%-protection") then - stripped_flags[flag] = true end - end ---print out the finalized set of flags for use by the extension builders -for k,_ in pairs(stripped_flags) do print(k .. " ") end -} - -# Variants of CFLAGS, CXXFLAGS, FFLAGS, LDFLAGS for use within -# extension builders. -%extension_cflags %{__extension_strip_flags cflags} -%extension_cxxflags %{__extension_strip_flags cxxflags} -%extension_fflags %{__extension_strip_flags fflags} -%extension_ldflags %{__extension_strip_flags ldflags} - #For backwards compatibility only. %__global_cflags %{build_cflags} %__global_cxxflags %{build_cxxflags} diff --git a/macros.extension b/macros.extension new file mode 100644 index 0000000..8118708 --- /dev/null +++ b/macros.extension @@ -0,0 +1,24 @@ +# Internal-only. Do not use. Expand a variable and strip the flags +# not suitable to extension builders. +%__extension_strip_flags() %{lua: +--the only argument to this macro is the "name" of the flags we strip (e.g. cflags, ldflags, etc.) +local name = rpm.expand("%{1}") +--store all the individual flags in a variable as a continuous string +local flags = rpm.expand("%{build_" .. name .. "}") +--create an empty table for the minimal set of flags we wanna preserve +local stripped_flags = { } +--iterate over the individual flags and store the ones we want in the table as unique keys +for flag in flags:gmatch("%S+") do + if flag:find("^%-fexceptions") or flag:find("^%-fcf%-protection") then + stripped_flags[flag] = true end + end +--print out the finalized set of flags for use by the extension builders +for k,_ in pairs(stripped_flags) do print(k .. " ") end +} + +# Variants of CFLAGS, CXXFLAGS, FFLAGS, LDFLAGS for use within +# extension builders. +%extension_cflags %{__extension_strip_flags cflags} +%extension_cxxflags %{__extension_strip_flags cxxflags} +%extension_fflags %{__extension_strip_flags fflags} +%extension_ldflags %{__extension_strip_flags ldflags} diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index d044886..33bbeb0 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 31 -Release: 6 +Release: 7 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/src-openeuler/openEuler-rpm-config @@ -30,6 +30,7 @@ Source101: macros.forge Source102: macros.go Source103: macros.python Source104: macros.kmp +Source105: macros.extension # Dependency generator scripts Source200: find-requires.ksyms @@ -146,13 +147,13 @@ install -p -m 755 -t %{buildroot}%{rpmvdir} find-requires* install -p -m 755 -t %{buildroot}%{rpmvdir} find-provides* mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d -install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d/ macros.perl macros.python macros.go macros.forge macros.kmp +install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d/ macros.* mkdir -p %{buildroot}%{_fileattrsdir} install -p -m 644 -t %{buildroot}%{_fileattrsdir} *.attr mkdir -p %{buildroot}%{_rpmluadir}/%{_vendor}/{rpm,srpm} -install -p -m 644 -t %{buildroot}%{_rpmluadir}/%{_vendor} common.lua +install -p -m 644 -t %{buildroot}%{_rpmluadir}/%{_vendor} *.lua # Adaptive according to vendor sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir}` @@ -178,6 +179,9 @@ sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir %{rpmvdir}/find-requires.ksyms %changelog +* Thu Oct 24 2024 Funda Wang <fundawang@yeah.net> - 31-7 +- add python.lua from fedora + * Sat Oct 19 2024 Funda Wang <fundawang@yeah.net> - 31-6 - add extension flags for python modules |