diff --git a/_service b/_service index b58e6c7..1575196 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.1.%h - 10f46e14ff638192561d1de900eef46bdd9bb2eb + d6d9c0fddeefd4f22d4aa44d6a9f7bc7f625bcba general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index f91083d..0ef092a 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,25 +394,27 @@ 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 binary package %{s_name} \ +When this package gets updated it installs the latest version of %name. \ %{-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 binary package %{s_name\\\\nWhen this package gets updated it installs the latest version of %name.}' \ %define _readme README.%{_mylib}%{_name}%{_p_ext} \ %define _tmpexec %(tmp=$(mktemp /tmp/scr-XXXXXX); \ readme=%{_readme} \ echo "#!/bin/bash" > $tmp; \ - echo "echo %_msg \> $readme && rm -f $tmp || true" >> $tmp; \ + echo "echo -e %_msg \> $readme && rm -f $tmp || true" >> $tmp; \ chmod u+x $tmp; echo -n $tmp) \ %doc $(%_tmpexec)./%{_readme} \ } \ diff --git a/suse-hpc.changes b/suse-hpc.changes index 31b2632..0449dd9 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Tue Jun 19 05:08:01 UTC 2018 - eich@suse.com + +- Handle license file using %license where applicable. + +------------------------------------------------------------------- +Mon Jun 18 04:56:03 UTC 2018 - eich@suse.com + +- Improve description and README in master packages + Explain the purpose of the package and explicitly specify the dependency + in the package description and generated README. + +------------------------------------------------------------------- +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..025df36 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -16,12 +16,11 @@ # -%define git_ver .960d922 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 @@ -50,9 +49,15 @@ install -m 755 %{S:2} dlinfo %{buildroot}%{_rpmconfigdir} install -m 644 %{S:3} %{S:4} %{buildroot}%{_rpmconfigdir}/fileattrs cp %{S:5} . +%if 0%{?sle_version} > 120200 || 0%{?suse_version} > 1320 +%define mylicense %license +%else +%define mylicense %doc +%endif + %files %defattr(-,root,root,-) -%doc LICENSE +%mylicense LICENSE %config %{_sysconfdir}/rpm/macros.hpc %{_rpmconfigdir}/dlinfo %{_rpmconfigdir}/hpc_elf.pl