- Add lua-lmod to the HPC base Requires
- Fix %name in %hpc_python_master_package Not only %pname but also %name needs to have python replaced by %python_flavor. - Add macro to santize %pname for environment variables This marco up-cases the name and replaces '-' by '_'. OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=13
This commit is contained in:
parent
0bda09e250
commit
1bcc9c7ab4
2
_service
2
_service
@ -6,7 +6,7 @@
|
||||
<param name="exclude">.git</param>
|
||||
<param name="filename">suse-hpc</param>
|
||||
<param name="versionformat">0.1.%h</param>
|
||||
<param name="revision">960d92268df13a0806254c325e3e72e135268c77</param>
|
||||
<param name="revision">10f46e14ff638192561d1de900eef46bdd9bb2eb</param>
|
||||
<param name="extract">general/dlinfo.c</param>
|
||||
<param name="extract">general/macros.hpc</param>
|
||||
<param name="extract">general/hpc_elf.pl</param>
|
||||
|
11
macros.hpc
11
macros.hpc
@ -87,8 +87,9 @@ EOF\
|
||||
%hpc_mpi_requires_devel %{expand:%{hpc_%{hpc_mpi_family}_requires_devel}}
|
||||
|
||||
# Base
|
||||
%hpc_requires %{?hpc_compiler_family:%{!?_hpc_build_compiler:%hpc_cf_requires}}\
|
||||
%{?hpc_mpi_family:%{!?_hpc_build_mpi:%hpc_mpi_requires}}
|
||||
%hpc_requires Requires: lua-lmod \
|
||||
%{?hpc_compiler_family:%{!?_hpc_build_compiler:%hpc_cf_requires}}\
|
||||
%{?hpc_mpi_family:%{!?_hpc_build_mpi:%hpc_mpi_requires}}\
|
||||
|
||||
# Devel
|
||||
%hpc_requires_devel %{?hpc_compiler_family:%{!?_hpc_build_compiler:%hpc_cf_requires_devel}}\
|
||||
@ -418,6 +419,7 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version
|
||||
# Functions
|
||||
##
|
||||
%hpc_upcase() %(echo %{**} | tr [a-z] [A-Z])
|
||||
%hpc_PNAME() %(echo %{**} | tr [a-z-] [A-Z_])
|
||||
|
||||
##
|
||||
# Macros specific for python packages
|
||||
@ -464,6 +466,7 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version
|
||||
local a_arg = rpm.expand("%{?-a:-a}") \
|
||||
local other_arg = rpm.expand("%{*}") \
|
||||
local pname = rpm.expand("%pname") \
|
||||
local name = rpm.expand("%name") \
|
||||
local python_flavor = rpm.expand("%python_flavor") \
|
||||
-- io.stderr:write("n_arg "..n_arg.."\\n") \
|
||||
if n_arg ~= "" then \
|
||||
@ -471,7 +474,9 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version
|
||||
-- io.stderr:write("n_arg modfied "..n_arg .."\\n") \
|
||||
end \
|
||||
local n_pname = pname:gsub("^python", python_flavor,1) \
|
||||
local n_name = name:gsub("^python", python_flavor,1) \
|
||||
rpm.define("pname "..n_pname) \
|
||||
rpm.define("name "..n_name) \
|
||||
add_args (g_arg, "-g") \
|
||||
add_args (n_arg, "-n") \
|
||||
add_args (l_arg) \
|
||||
@ -487,6 +492,7 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version
|
||||
-- skip it entirely! \
|
||||
if _hpc_python_package_list[package] == true then \
|
||||
rpm.define("pname " .. pname) \
|
||||
rpm.define("name " .. name) \
|
||||
return \
|
||||
else \
|
||||
_hpc_python_package_list[package] = true \
|
||||
@ -497,6 +503,7 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version
|
||||
io.stderr:write("%{hpc_master_package " .. arg_list .. "}\\n\\n") \
|
||||
print(rpm.expand("%{hpc_master_package " .. arg_list .. "}") .."\\n") \
|
||||
rpm.define("pname " .. pname) \
|
||||
rpm.define("name " .. name) \
|
||||
-- io.stderr:write("pname "..rpm.expand("%pname").."\\n\\n") \
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 20 18:44:42 UTC 2017 - eich@suse.com
|
||||
|
||||
- Add lua-lmod to the HPC base Requires
|
||||
- Fix %name in %hpc_python_master_package
|
||||
Not only %pname but also %name needs to have python replaced
|
||||
by %python_flavor.
|
||||
- Add macro to santize %pname for environment variables
|
||||
This marco up-cases the name and replaces '-' by '_'.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 19 11:44:50 UTC 2017 - eich@suse.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user