From f0e6739e5796444c9e10b7b7488fbd789aff4f4305f0512bc0845ce64c4d9c4c Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Mon, 20 Nov 2017 20:03:10 +0000 Subject: [PATCH] - 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 --- _service | 2 +- macros.hpc | 11 +++++++++-- suse-hpc.changes | 10 ++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/_service b/_service index 0f144b4..b58e6c7 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.1.%h - 960d92268df13a0806254c325e3e72e135268c77 + 10f46e14ff638192561d1de900eef46bdd9bb2eb general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index 030b7e4..67d8c8b 100644 --- a/macros.hpc +++ b/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") \ } diff --git a/suse-hpc.changes b/suse-hpc.changes index 9ba2f06..1169e70 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -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