Accepting request 674908 from science
- mark examples as a noarch package - install license for examples and remove unnecessary dependencies - add an examples sub package to test 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/674908 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gsl?expand=0&rev=42
This commit is contained in:
commit
870ae0fe98
24
gsl.changes
24
gsl.changes
@ -1,3 +1,27 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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 <aginies@suse.com>
|
||||||
|
|
||||||
|
- add an examples sub package to test in production env
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 11 19:09:54 UTC 2019 - Egbert Eich <eich@suse.com>
|
||||||
|
|
||||||
|
- 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
|
Tue Oct 23 16:30:44 UTC 2018 - jjolly@suse.com
|
||||||
|
|
||||||
|
111
gsl.spec
111
gsl.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package gsl
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# 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_datadir %_datadir
|
||||||
%define p_infodir %_infodir
|
%define p_infodir %_infodir
|
||||||
%define num_threads 64
|
%define num_threads 64
|
||||||
%define libname() lib%{pname}%{lgsl_so_v}
|
%define libname lib%{pname}%{lgsl_so_v}
|
||||||
%define libcblas() lib%{pname}cblas%{lgslcblas_so_v}
|
%define libcblas lib%{pname}cblas%{lgslcblas_so_v}
|
||||||
|
|
||||||
%else
|
%else
|
||||||
|
|
||||||
@ -77,8 +77,8 @@ ExclusiveArch: do_not_build
|
|||||||
%define p_datadir %hpc_datadir
|
%define p_datadir %hpc_datadir
|
||||||
%define p_infodir %hpc_infodir
|
%define p_infodir %hpc_infodir
|
||||||
%define num_threads 256
|
%define num_threads 256
|
||||||
%define libname() lib%{pname}%{expand:%%{hpc_package_name_tail %{**}}}
|
%define libname lib%{package_name}
|
||||||
%define libcblas() lib%{pname}cblas%{expand:%%{hpc_package_name_tail %{**}}}
|
%define libcblas lib%{pname}cblas%{hpc_package_name_tail %{_vers}}
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -107,14 +107,13 @@ BuildRequires: update-alternatives
|
|||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%else
|
%else
|
||||||
%hpc_requires
|
|
||||||
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
||||||
BuildRequires: lua-lmod
|
BuildRequires: lua-lmod
|
||||||
BuildRequires: suse-hpc
|
BuildRequires: suse-hpc
|
||||||
|
Requires: %{libname} = %version
|
||||||
%global dep_summary %{summary}
|
%global dep_summary %{summary}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The GNU Scientific Library (GSL) is a collection of routines for
|
The GNU Scientific Library (GSL) is a collection of routines for
|
||||||
numerical computing. The routines are written from scratch by the GSL
|
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
|
(API) for C programmers, while allowing wrappers to be written for very
|
||||||
high level languages.
|
high level languages.
|
||||||
|
|
||||||
%package -n %{libname %_vers}
|
%package -n %{libname}
|
||||||
Summary: GNU Scientific Library
|
Summary: GNU Scientific Library
|
||||||
Group: System/Libraries
|
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}}
|
%{?with_hpc:%{hpc_master_package}}
|
||||||
|
|
||||||
%description -n %{libname %_vers}
|
%description -n %{libname}
|
||||||
The GNU Scientific Library (GSL) is a collection of routines for
|
The GNU Scientific Library (GSL) is a collection of routines for
|
||||||
numerical computing. The routines are written from scratch by the GSL
|
numerical computing. The routines are written from scratch by the GSL
|
||||||
team in ANSI C and present an Applications Programming Interface
|
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}}
|
%{?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
|
Summary: A standard C language APIs for BLAS from GNU Scientific Library
|
||||||
# file conflict, see boo#991155
|
# file conflict, see boo#991155
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Obsoletes: libgsl0
|
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
|
This library provides a native C interface to BLAS routines. This is part of
|
||||||
the GNU Scientific Library.
|
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
|
%package devel
|
||||||
Summary: Development files for the GNU Scientific Library
|
Summary: Development files for the GNU Scientific Library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{libname %_vers} = %{version}
|
Requires: %{libcblas} = %{version}
|
||||||
Requires: %{libcblas %_vers} = %{version}
|
Requires: %{libname} = %{version}
|
||||||
Requires(pre): %{install_info_prereq}
|
Requires(pre): %{install_info_prereq}
|
||||||
%{?with_hpc:%hpc_requires_devel}
|
%{?with_hpc:%hpc_requires_devel}
|
||||||
|
|
||||||
@ -181,13 +187,13 @@ team in ANSI C, and present an Applications Programming Interface
|
|||||||
(API) for C programmers, while allowing wrappers to be written for very
|
(API) for C programmers, while allowing wrappers to be written for very
|
||||||
high level languages.
|
high level languages.
|
||||||
|
|
||||||
%{?with_hpc:%{hpc_master_package devel}}
|
%{?with_hpc:%{hpc_master_package -L devel}}
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for the GNU Scientific Library
|
Summary: Documentation for the GNU Scientific Library
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
Requires(post): %{install_info_prereq}
|
Requires(post): %{install_info_prereq}
|
||||||
Requires(preun): %{install_info_prereq}
|
Requires(preun):%{install_info_prereq}
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
This package contains documentation for GSL
|
This package contains documentation for GSL
|
||||||
@ -200,6 +206,15 @@ high level languages.
|
|||||||
|
|
||||||
%{?with_hpc:%{hpc_master_package doc}}
|
%{?with_hpc:%{hpc_master_package doc}}
|
||||||
|
|
||||||
|
%package examples
|
||||||
|
Summary: Examples for the GNU Scientific Library
|
||||||
|
Group: Documentation/Other
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description examples
|
||||||
|
This package contains examples for GSL
|
||||||
|
|
||||||
|
|
||||||
%if %{with hpc}
|
%if %{with hpc}
|
||||||
%package module
|
%package module
|
||||||
Summary: Module files for %{name}
|
Summary: Module files for %{name}
|
||||||
@ -224,7 +239,7 @@ library packages.
|
|||||||
|
|
||||||
%if %{with hpc}
|
%if %{with hpc}
|
||||||
%hpc_debug
|
%hpc_debug
|
||||||
%hpc_setup_compiler
|
%hpc_setup
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
@ -246,6 +261,10 @@ make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit
|
|||||||
%else
|
%else
|
||||||
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 1 )
|
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 1 )
|
||||||
%endif
|
%endif
|
||||||
|
# Clean up to package directory
|
||||||
|
make -C doc/examples clean
|
||||||
|
chmod a-x doc/examples/*
|
||||||
|
rm doc/examples/Makefile*
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{?with_hpc:%hpc_setup}
|
%{?with_hpc:%hpc_setup}
|
||||||
@ -255,7 +274,8 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
rm -f %{buildroot}%{p_infodir}/dir
|
rm -f %{buildroot}%{p_infodir}/dir
|
||||||
|
|
||||||
%if %{with hpc}
|
%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
|
%hpc_write_modules_files
|
||||||
#%%Module1.0#####################################################################
|
#%%Module1.0#####################################################################
|
||||||
@ -270,7 +290,7 @@ puts stderr "\nVersion %{version}\n"
|
|||||||
module-whatis "Name: %{pname} built with %{compiler_family} toolchain"
|
module-whatis "Name: %{pname} built with %{compiler_family} toolchain"
|
||||||
module-whatis "Version: %{version}"
|
module-whatis "Version: %{version}"
|
||||||
module-whatis "Category: runtime library"
|
module-whatis "Category: runtime library"
|
||||||
module-whatis "Description: %{summary}"
|
module-whatis "Description: %{SUMMARY}"
|
||||||
module-whatis "%{url}"
|
module-whatis "%{url}"
|
||||||
|
|
||||||
set version %{version}
|
set version %{version}
|
||||||
@ -282,12 +302,15 @@ setenv %{hpc_upcase %pname}_DIR %{hpc_prefix}
|
|||||||
setenv %{hpc_upcase %pname}_BIN %{hpc_bindir}
|
setenv %{hpc_upcase %pname}_BIN %{hpc_bindir}
|
||||||
setenv %{hpc_upcase %pname}_LIB %{hpc_libdir}
|
setenv %{hpc_upcase %pname}_LIB %{hpc_libdir}
|
||||||
|
|
||||||
if {[file isdirectory %{hpc_includedir}]} {
|
|
||||||
prepend-path LIBRARY_PATH %{hpc_libdir}
|
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 CPATH %{hpc_includedir}
|
||||||
prepend-path C_INCLUDE_PATH %{hpc_includedir}
|
prepend-path C_INCLUDE_PATH %{hpc_includedir}
|
||||||
prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir}
|
prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir}
|
||||||
prepend-path INCLUDE %{hpc_includedir}
|
prepend-path INCLUDE %{hpc_includedir}
|
||||||
|
%hpc_modulefile_add_pkgconfig_path
|
||||||
|
|
||||||
setenv %{hpc_upcase %pname}_INC %{hpc_includedir}
|
setenv %{hpc_upcase %pname}_INC %{hpc_includedir}
|
||||||
}
|
}
|
||||||
@ -297,10 +320,27 @@ family "%pname"
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n %{libname %_vers} -p /sbin/ldconfig
|
%if %{without hpc}
|
||||||
%postun -n %{libname %_vers} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
%post -n %{libcblas %_vers} -p /sbin/ldconfig
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
%postun -n %{libcblas %_vers} -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}
|
%if %{with hpc}
|
||||||
%files module
|
%files module
|
||||||
@ -318,12 +358,12 @@ EOF
|
|||||||
%{p_mandir}/man1/gsl-histogram.1%{?manext}
|
%{p_mandir}/man1/gsl-histogram.1%{?manext}
|
||||||
%{p_mandir}/man1/gsl-randist.1%{?manext}
|
%{p_mandir}/man1/gsl-randist.1%{?manext}
|
||||||
|
|
||||||
%files -n %{libname %_vers}
|
%files -n %{libname}
|
||||||
%{?with_hpc:%hpc_dirs}
|
%{?with_hpc:%hpc_dirs}
|
||||||
%{?with_hpc:%dir %p_libdir}
|
%{?with_hpc:%dir %p_libdir}
|
||||||
%{p_libdir}/libgsl.so.*
|
%{p_libdir}/libgsl.so.*
|
||||||
|
|
||||||
%files -n %{libcblas %_vers}
|
%files -n %{libcblas}
|
||||||
%{?with_hpc:%hpc_dirs}
|
%{?with_hpc:%hpc_dirs}
|
||||||
%{p_libdir}/libgslcblas.so.*
|
%{p_libdir}/libgslcblas.so.*
|
||||||
|
|
||||||
@ -333,8 +373,13 @@ EOF
|
|||||||
%{p_includedir}
|
%{p_includedir}
|
||||||
%{?with_hpc:%dir %{p_includedir}/gsl}
|
%{?with_hpc:%dir %{p_includedir}/gsl}
|
||||||
%{p_libdir}/libgsl*.so
|
%{p_libdir}/libgsl*.so
|
||||||
|
%if %{without hpc}
|
||||||
%{p_libdir}/pkgconfig
|
%{p_libdir}/pkgconfig
|
||||||
%{p_libdir}/pkgconfig/gsl.pc
|
%{p_libdir}/pkgconfig/gsl.pc
|
||||||
|
%else
|
||||||
|
%{hpc_pkgconfig_file}
|
||||||
|
%{hpc_pkgconfig_file -N -n %{pname}cblas}
|
||||||
|
%endif
|
||||||
%{p_bindir}/gsl-config
|
%{p_bindir}/gsl-config
|
||||||
%{?with_hpc:%dir %p_datadir}
|
%{?with_hpc:%dir %p_datadir}
|
||||||
%dir %{p_datadir}/aclocal
|
%dir %{p_datadir}/aclocal
|
||||||
@ -343,6 +388,10 @@ EOF
|
|||||||
%{?with_hpc:%dir %{p_mandir}/man3}
|
%{?with_hpc:%dir %{p_mandir}/man3}
|
||||||
%{p_mandir}/man3/gsl.3%{?manext}
|
%{p_mandir}/man3/gsl.3%{?manext}
|
||||||
|
|
||||||
|
%files examples
|
||||||
|
%doc doc/examples
|
||||||
|
%license COPYING
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
|
%doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
Loading…
Reference in New Issue
Block a user