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