Accepting request 617653 from science:HPC
- Improve test to be more general. (forwarded request 617652 from eeich) OBS-URL: https://build.opensuse.org/request/show/617653 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suse-hpc?expand=0&rev=11
This commit is contained in:
commit
b9e1ece6ee
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">10f46e14ff638192561d1de900eef46bdd9bb2eb</param>
|
||||
<param name="revision">d6d9c0fddeefd4f22d4aa44d6a9f7bc7f625bcba</param>
|
||||
<param name="extract">general/dlinfo.c</param>
|
||||
<param name="extract">general/macros.hpc</param>
|
||||
<param name="extract">general/hpc_elf.pl</param>
|
||||
|
18
macros.hpc
18
macros.hpc
@ -353,10 +353,12 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version}
|
||||
# -a: Use native arch even if no library package.
|
||||
# -N <pname>: 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} \
|
||||
} \
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user