From 3a597ec2f0c9a3a666a63bdc4dc2429fd24d886a1888005f1476fa0ee4f6fc5e Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Sat, 16 Jun 2018 19:49:12 +0000 Subject: [PATCH] - Fix master package summary and description - Add support for different name than %name OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=24 --- _service | 2 +- macros.hpc | 15 +++++++++------ suse-hpc.changes | 6 ++++++ suse-hpc.spec | 4 ++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/_service b/_service index b58e6c7..dce10be 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.1.%h - 10f46e14ff638192561d1de900eef46bdd9bb2eb + 131fdf981724f18a7cef824665884cc40491f265 general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index f91083d..8e94b07 100644 --- a/macros.hpc +++ b/macros.hpc @@ -353,10 +353,12 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version} # -a: Use native arch even if no library package. # -N : Specify if a sub-package has different basename (pname) # -q: For internal use only! +# -M: use specified name in place of %%name # -%hpc_master_package(n:g:s:lLaqN:) \ +%hpc_master_package(n:g:s:lLaqN:M:) \ %define _mylib %{-s:lib}%{!-s:%{-l:lib}} \ %define _p_ext %(test -n "%{*}" && echo -%{*}) \ + %{-M: \ %define name %{-M*}} \ %{!-N:\ %define _pname %{pname} \ %define _name %{name} \ @@ -392,20 +394,21 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version} } \ %{!-s:%define n_name %_name} \ %{-s:%define n_name %(a=%{_name};echo -n ${a/%{_pname}/%{_pname}%{-s*}})} \ + %{!-s:%define s_name %{_mylib}%{n_name}%{_p_ext}} \ + %{-s:%define s_name %(echo -n %{_mylib}%{_name}%{_p_ext} | sed -e "s/\\(.*%{_pname}\\)\\(.*\\)/\\\\1%{-s*}\\\\2/")} \ %package -n %_lname \ -Summary: Dependency package for %{n_name}%{_p_ext} \ +Summary: Dependency package for %{s_name} \ Group: %_group \ Obsoletes: %_lname < %version \ -%{!-s:Requires: %{_mylib}%{_name}%{_p_ext} = %version} \ -%{-s:Requires: %(echo -n %{_mylib}%{_name}%{_p_ext} | sed -e "s/\\(.*%{_pname}\\)\\(.*\\)/\\\\1%{-s*}\\\\2/") = %version} \ +Requires: %{s_name} = %version \ %{!-l:%{!-s:%{!-a:BuildArch: noarch}}} \ %description -n %_lname \ -The package %{n_name}%{_p_ext} provides the dependency to get the latest version of %_pname \ +The package %{l_name} provides the dependency to get the latest binary package version of %{_pname} \ %{-L:%post -n %_lname \ ln -sf %{hpc_module_dep_base}.version.%{version} %{hpc_module_dep_base}.version} \ %files -n %{_lname} \ %defattr(-,root,root)\ - %define _msg '%{summary:0}: Provide the dependency to get the latest version of %_pname' \ + %define _msg '%{summary:0}: Provide the dependency to get the latest binary package version of %{_pname}' \ %define _readme README.%{_mylib}%{_name}%{_p_ext} \ %define _tmpexec %(tmp=$(mktemp /tmp/scr-XXXXXX); \ readme=%{_readme} \ diff --git a/suse-hpc.changes b/suse-hpc.changes index 31b2632..18c93a1 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jun 16 19:38:18 UTC 2018 - eich@suse.com + +- Fix master package summary and description +- Add support for different name than %name + ------------------------------------------------------------------- Mon Mar 12 19:20:16 UTC 2018 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index 8a4e5d8..c812064 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -16,12 +16,12 @@ # -%define git_ver .960d922 +%define git_ver .131fdf9 Summary: SUSE HPC Environment License: BSD-3-Clause Group: Productivity/Clustering/Computing Name: suse-hpc -Version: 0.1 +Version: 0.2 Release: 0 Source0: macros.hpc Source1: dlinfo.c