From e1d59a9200eb67d969bde3a534eba19cc6116cb227d8ac86d5f2642f382dcd90 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 14 Feb 2019 08:57:41 +0000 Subject: [PATCH 1/3] Accepting request 674831 from home:eeich:branches:science - add an examples sub package to tet in production env - Simplify package naming for HPC. - Fix dependencies for HPC. - Library directory is always available when module file is installed, do not hide it. - Properly create and tear down default version links when the HPC master packages are installed/uninstalled. - Create pkgconfig file for gslcblas as well. - Add missing env variables to modules file: MANPATH, INFOPATH, PKG_CONFIG_PATH. OBS-URL: https://build.opensuse.org/request/show/674831 OBS-URL: https://build.opensuse.org/package/show/science/gsl?expand=0&rev=21 --- gsl.changes | 18 +++++++++ gsl.spec | 105 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 95 insertions(+), 28 deletions(-) diff --git a/gsl.changes b/gsl.changes index 10814ed..ae059ee 100644 --- a/gsl.changes +++ b/gsl.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Feb 13 08:51:31 UTC 2019 - Antoine Ginies + +- add an examples sub package to tet in production env + +------------------------------------------------------------------- +Mon Feb 11 19:09:54 UTC 2019 - Egbert Eich + +- Simplify package naming for HPC. +- Fix dependencies for HPC. +- Library directory is always available when module file is + installed, do not hide it. +- Properly create and tear down default version links when the + HPC master packages are installed/uninstalled. +- Create pkgconfig file for gslcblas as well. +- Add missing env variables to modules file: MANPATH, INFOPATH, + PKG_CONFIG_PATH. + ------------------------------------------------------------------- Tue Oct 23 16:30:44 UTC 2018 - jjolly@suse.com diff --git a/gsl.spec b/gsl.spec index 3e2a4b7..7ee81ef 100644 --- a/gsl.spec +++ b/gsl.spec @@ -1,7 +1,7 @@ # # spec file for package gsl # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -61,8 +61,8 @@ ExclusiveArch: do_not_build %define p_datadir %_datadir %define p_infodir %_infodir %define num_threads 64 -%define libname() lib%{pname}%{lgsl_so_v} -%define libcblas() lib%{pname}cblas%{lgslcblas_so_v} +%define libname lib%{pname}%{lgsl_so_v} +%define libcblas lib%{pname}cblas%{lgslcblas_so_v} %else @@ -77,8 +77,8 @@ ExclusiveArch: do_not_build %define p_datadir %hpc_datadir %define p_infodir %hpc_infodir %define num_threads 256 -%define libname() lib%{pname}%{expand:%%{hpc_package_name_tail %{**}}} -%define libcblas() lib%{pname}cblas%{expand:%%{hpc_package_name_tail %{**}}} +%define libname lib%{package_name} +%define libcblas lib%{pname}cblas%{hpc_package_name_tail %{_vers}} %endif @@ -107,14 +107,13 @@ BuildRequires: update-alternatives Requires(post): update-alternatives Requires(preun): update-alternatives %else -%hpc_requires BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel BuildRequires: lua-lmod BuildRequires: suse-hpc +Requires: %{libname} = %version %global dep_summary %{summary} %endif - %description The GNU Scientific Library (GSL) is a collection of routines for numerical computing. The routines are written from scratch by the GSL @@ -122,14 +121,18 @@ team in ANSI C and present an Applications Programming Interface (API) for C programmers, while allowing wrappers to be written for very high level languages. -%package -n %{libname %_vers} +%package -n %{libname} Summary: GNU Scientific Library Group: System/Libraries -%{?with_hpc:Requires: %{name}-module >= %version} +%if %{with hpc} +%{hpc_requires} +BuildRequires: lua-lmod +Requires: %{name}-module = %version +%endif %{?with_hpc:%{hpc_master_package}} -%description -n %{libname %_vers} +%description -n %{libname} The GNU Scientific Library (GSL) is a collection of routines for numerical computing. The routines are written from scratch by the GSL team in ANSI C and present an Applications Programming Interface @@ -150,24 +153,27 @@ Least-Squares Fitting - Physical Constants - IEEE Floating-Point %{?with_hpc:%{hpc_master_package -l -L}} -%package -n %{libcblas %_vers} +%package -n %{libcblas} Summary: A standard C language APIs for BLAS from GNU Scientific Library # file conflict, see boo#991155 Group: System/Libraries Obsoletes: libgsl0 -%{?with_hpc:Requires: %{name}-module >= %version} +%if %{with hpc} +%{hpc_requires} +Requires: %{name}-module = %version +%endif -%description -n %{libcblas %_vers} +%description -n %{libcblas} This library provides a native C interface to BLAS routines. This is part of the GNU Scientific Library. -%{?with_hpc:%{hpc_master_package -l -n lib%{pname}cblas%{hpc_package_name_tail} -N %{pname}cblas}} +%{?with_hpc:%{hpc_master_package -L -l -n lib%{pname}cblas%{hpc_package_name_tail} -N %{pname}cblas}} %package devel Summary: Development files for the GNU Scientific Library Group: Development/Libraries/C and C++ -Requires: %{libname %_vers} = %{version} -Requires: %{libcblas %_vers} = %{version} +Requires: %{libcblas} = %{version} +Requires: %{libname} = %{version} Requires(pre): %{install_info_prereq} %{?with_hpc:%hpc_requires_devel} @@ -181,7 +187,7 @@ team in ANSI C, and present an Applications Programming Interface (API) for C programmers, while allowing wrappers to be written for very high level languages. -%{?with_hpc:%{hpc_master_package devel}} +%{?with_hpc:%{hpc_master_package -L devel}} %package doc Summary: Documentation for the GNU Scientific Library @@ -200,6 +206,16 @@ high level languages. %{?with_hpc:%{hpc_master_package doc}} +%package examples +Summary: Examples for the GNU Scientific Library +Group: Documentation/Other +Requires(post): %{install_info_prereq} +Requires(preun): %{install_info_prereq} + +%description examples +This package contains GSL examples GSL + + %if %{with hpc} %package module Summary: Module files for %{name} @@ -224,7 +240,7 @@ library packages. %if %{with hpc} %hpc_debug -%hpc_setup_compiler +%hpc_setup %endif autoreconf -fiv @@ -246,6 +262,10 @@ make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit %else make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 1 ) %endif +# Clean up to package directory +make -C doc/examples clean +chmod a-x doc/examples/* +rm doc/examples/Makefile.* %install %{?with_hpc:%hpc_setup} @@ -255,7 +275,8 @@ find %{buildroot} -type f -name "*.la" -delete -print rm -f %{buildroot}%{p_infodir}/dir %if %{with hpc} -%{hpc_write_pkgconfig -n %{pname} -l lib%{pname}} +%{hpc_write_pkgconfig} +%{hpc_write_pkgconfig -n %{pname}cblas -l %{pname}cblas} %hpc_write_modules_files #%%Module1.0##################################################################### @@ -270,7 +291,7 @@ puts stderr "\nVersion %{version}\n" module-whatis "Name: %{pname} built with %{compiler_family} toolchain" module-whatis "Version: %{version}" module-whatis "Category: runtime library" -module-whatis "Description: %{summary}" +module-whatis "Description: %{SUMMARY}" module-whatis "%{url}" set version %{version} @@ -282,12 +303,15 @@ setenv %{hpc_upcase %pname}_DIR %{hpc_prefix} setenv %{hpc_upcase %pname}_BIN %{hpc_bindir} setenv %{hpc_upcase %pname}_LIB %{hpc_libdir} -if {[file isdirectory %{hpc_includedir}]} { prepend-path LIBRARY_PATH %{hpc_libdir} +prepend-path MANPATH %{hpc_mandir} +prepend-path INFOPATH %{hpc_infodir} +if {[file isdirectory %{hpc_includedir}]} { prepend-path CPATH %{hpc_includedir} prepend-path C_INCLUDE_PATH %{hpc_includedir} prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir} prepend-path INCLUDE %{hpc_includedir} +%hpc_modulefile_add_pkgconfig_path setenv %{hpc_upcase %pname}_INC %{hpc_includedir} } @@ -297,10 +321,27 @@ family "%pname" EOF %endif -%post -n %{libname %_vers} -p /sbin/ldconfig -%postun -n %{libname %_vers} -p /sbin/ldconfig -%post -n %{libcblas %_vers} -p /sbin/ldconfig -%postun -n %{libcblas %_vers} -p /sbin/ldconfig +%if %{without hpc} +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig +%post -n %{libcblas} -p /sbin/ldconfig +%postun -n %{libcblas} -p /sbin/ldconfig +%else +%post -n %{libname} +/sbin/ldconfig -N %{p_libdir} + +%postun -n %{libname} +/sbin/ldconfig -N %{p_libdir} + +%post -n %{libcblas} +/sbin/ldconfig -N %{p_libdir} + +%postun -n %{libcblas} +/sbin/ldconfig -N %{p_libdir} + +%postun -n %{name}-module +%hpc_module_delete_if_default +%endif %if %{with hpc} %files module @@ -318,12 +359,12 @@ EOF %{p_mandir}/man1/gsl-histogram.1%{?manext} %{p_mandir}/man1/gsl-randist.1%{?manext} -%files -n %{libname %_vers} +%files -n %{libname} %{?with_hpc:%hpc_dirs} %{?with_hpc:%dir %p_libdir} %{p_libdir}/libgsl.so.* -%files -n %{libcblas %_vers} +%files -n %{libcblas} %{?with_hpc:%hpc_dirs} %{p_libdir}/libgslcblas.so.* @@ -333,8 +374,13 @@ EOF %{p_includedir} %{?with_hpc:%dir %{p_includedir}/gsl} %{p_libdir}/libgsl*.so +%if %{without hpc} %{p_libdir}/pkgconfig %{p_libdir}/pkgconfig/gsl.pc +%else +%{hpc_pkgconfig_file} +%{hpc_pkgconfig_file -N -n %{pname}cblas} +%endif %{p_bindir}/gsl-config %{?with_hpc:%dir %p_datadir} %dir %{p_datadir}/aclocal @@ -343,6 +389,9 @@ EOF %{?with_hpc:%dir %{p_mandir}/man3} %{p_mandir}/man3/gsl.3%{?manext} +%files examples +%doc doc/examples + %files doc %doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO %license COPYING From 8aa208fa06d73d892dfaadbad8ad7d245dd330839672b6236d44ae59c5b6cbac Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 14 Feb 2019 09:13:12 +0000 Subject: [PATCH 2/3] - mark examples as a noarch package - install license for examples and remove unnecessary dependencies - add an examples sub package to test in production env OBS-URL: https://build.opensuse.org/package/show/science/gsl?expand=0&rev=22 --- gsl.changes | 8 +++++++- gsl.spec | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gsl.changes b/gsl.changes index ae059ee..acc68e1 100644 --- a/gsl.changes +++ b/gsl.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Thu Feb 14 09:00:22 UTC 2019 - adam.majer@suse.de + +- mark examples as a noarch package +- install license for examples and remove unnecessary dependencies + ------------------------------------------------------------------- Wed Feb 13 08:51:31 UTC 2019 - Antoine Ginies -- add an examples sub package to tet in production env +- add an examples sub package to test in production env ------------------------------------------------------------------- Mon Feb 11 19:09:54 UTC 2019 - Egbert Eich diff --git a/gsl.spec b/gsl.spec index 7ee81ef..e4abe10 100644 --- a/gsl.spec +++ b/gsl.spec @@ -189,11 +189,11 @@ high level languages. %{?with_hpc:%{hpc_master_package -L devel}} -%package doc +%package doc Summary: Documentation for the GNU Scientific Library Group: Documentation/Other -Requires(post): %{install_info_prereq} -Requires(preun): %{install_info_prereq} +Requires(post): %{install_info_prereq} +Requires(preun):%{install_info_prereq} %description doc This package contains documentation for GSL @@ -209,8 +209,7 @@ high level languages. %package examples Summary: Examples for the GNU Scientific Library Group: Documentation/Other -Requires(post): %{install_info_prereq} -Requires(preun): %{install_info_prereq} +BuildArch: noarch %description examples This package contains GSL examples GSL @@ -265,7 +264,7 @@ make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit # Clean up to package directory make -C doc/examples clean chmod a-x doc/examples/* -rm doc/examples/Makefile.* +rm doc/examples/Makefile* %install %{?with_hpc:%hpc_setup} @@ -391,6 +390,7 @@ EOF %files examples %doc doc/examples +%license COPYING %files doc %doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO From 2b2a3407d8669aaa2b5ff474867890db63d0f14f8175eae3a26f905629ca5ec7 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 14 Feb 2019 09:16:24 +0000 Subject: [PATCH 3/3] description fix OBS-URL: https://build.opensuse.org/package/show/science/gsl?expand=0&rev=23 --- gsl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsl.spec b/gsl.spec index e4abe10..fc0e08e 100644 --- a/gsl.spec +++ b/gsl.spec @@ -212,7 +212,7 @@ Group: Documentation/Other BuildArch: noarch %description examples -This package contains GSL examples GSL +This package contains examples for GSL %if %{with hpc}