Accepting request 507956 from home:badshah400:branches:science
- Add libsz2-devel to list of Requires for -devel packages, this is required for compilation against hdf5 when szlib support is enabled. - Minor specfile cleanups using spec-cleaner. OBS-URL: https://build.opensuse.org/request/show/507956 OBS-URL: https://build.opensuse.org/package/show/science/hdf5?expand=0&rev=41
This commit is contained in:
parent
55450cbf58
commit
56171e9be1
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 12:53:05 UTC 2017 - badshah400@gmail.com
|
||||
|
||||
- Add libsz2-devel to list of Requires for -devel packages, this
|
||||
is required for compilation against hdf5 when szlib support is
|
||||
enabled.
|
||||
- Minor specfile cleanups using spec-cleaner.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 16 21:13:30 UTC 2017 - junghans@votca.org
|
||||
|
||||
|
45
hdf5.spec
45
hdf5.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hdf5
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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
|
||||
@ -24,7 +24,6 @@
|
||||
%endif
|
||||
|
||||
%define _mpi %{?_openmpi:openmpi} %{?_mvapich2:mvapich2}
|
||||
|
||||
# TODO: The so numbers autodetected by update_so_version.sh
|
||||
# do not match the so numbers that are actually buit.
|
||||
%define sonum 100
|
||||
@ -59,14 +58,13 @@ Patch5: hdf5-ldouble-ppc64le.patch
|
||||
Patch6: hdf5-buildcompare.patch
|
||||
Patch7: hdf5-mpi.patch
|
||||
Patch8: hdf5_disable_testphdf5.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: libsz2-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libsz2-devel
|
||||
%if 0%{?_openmpi}
|
||||
BuildRequires: openmpi-devel
|
||||
%endif
|
||||
@ -79,6 +77,7 @@ Requires: libhdf5_fortran%{sonum_F} = %{version}
|
||||
Requires: libhdf5_hl%{sonum_HL} = %{version}
|
||||
Requires: libhdf5_hl_cpp%{sonum_HL_CXX} = %{version}
|
||||
Requires: libhdf5hl_fortran%{sonum_HL_F} = %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
HDF5 is a data model, library, and file format for storing and
|
||||
@ -570,6 +569,7 @@ Summary: Development files for %{name}
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-devel-data = %{version}
|
||||
Requires: libsz2-devel
|
||||
# Required by Fortran programs?
|
||||
Requires: libhdf5-%{sonum} = %{version}
|
||||
Requires: libhdf5_cpp%{sonum_CXX} = %{version}
|
||||
@ -604,6 +604,7 @@ Summary: Development files for %{name}-openmpi
|
||||
Group: Development/Libraries/Parallel
|
||||
Requires: %{name}-devel-data = %{version}
|
||||
Requires: %{name}-openmpi = %{version}
|
||||
Requires: libsz2-devel
|
||||
# Required by Fortran programs?
|
||||
Requires: libhdf5-%{sonum}-openmpi = %{version}
|
||||
Requires: libhdf5_fortran%{sonum_F}-openmpi = %{version}
|
||||
@ -636,6 +637,7 @@ Summary: Development files for %{name}-mvapich2
|
||||
Group: Development/Libraries/Parallel
|
||||
Requires: %{name}-devel-data = %{version}
|
||||
Requires: %{name}-mvapich2 = %{version}
|
||||
Requires: libsz2-devel
|
||||
# Required by Fortran programs?
|
||||
Requires: libhdf5-%{sonum}-mvapich2 = %{version}
|
||||
Requires: libhdf5_fortran%{sonum_F}-mvapich2 = %{version}
|
||||
@ -769,7 +771,7 @@ processing, visualization, and archiving.
|
||||
This package provides examples of HDF5 library use.
|
||||
|
||||
%prep
|
||||
%setup -q -n %name-%version-patch1
|
||||
%setup -q -n %{name}-%{version}-patch1
|
||||
%patch0 -p1 -b .LD_LIBRARY_PATH
|
||||
%patch1 -p0 -b .non_void_return
|
||||
%patch2 -p0 -b .abort_unknown_host_config
|
||||
@ -781,8 +783,8 @@ This package provides examples of HDF5 library use.
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
|
||||
echo "prepare parallel builds: %_mpi"
|
||||
for build_dir in build %_mpi; do
|
||||
echo "prepare parallel builds: %{_mpi}"
|
||||
for build_dir in build %{_mpi}; do
|
||||
mkdir $build_dir
|
||||
ln -s ../configure $build_dir
|
||||
done
|
||||
@ -793,7 +795,7 @@ export CXX=g++
|
||||
export F9X=gfortran
|
||||
# workaround for known gcc issue, see RELEASE.txt
|
||||
if gcc --version |grep -q " 4\.[68]"; then
|
||||
export CFLAGS="${RPM_OPT_FLAGS/-O2/-O0}"
|
||||
export CFLAGS="%{optflags}/-O2/-O0}"
|
||||
fi
|
||||
%ifarch %arm
|
||||
# we want to have useful H5_CFLAGS on arm too
|
||||
@ -828,19 +830,19 @@ pushd build
|
||||
make V=1 %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
for mpi in %_mpi;
|
||||
for mpi in %{_mpi};
|
||||
do
|
||||
pushd $mpi
|
||||
export CC="%{_libdir}/mpi/gcc/$mpi/bin/mpicc"
|
||||
export FC="%{_libdir}/mpi/gcc/$mpi/bin/mpif90"
|
||||
export F77="%{_libdir}/mpi/gcc/$mpi/bin/mpif77"
|
||||
export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%_lib"
|
||||
export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%{_lib}"
|
||||
%configure \
|
||||
--docdir=%{_docdir}/%{name} \
|
||||
--prefix=%{_libdir}/mpi/gcc/$mpi \
|
||||
--exec-prefix=%{_libdir}/mpi/gcc/$mpi \
|
||||
--bindir=%{_libdir}/mpi/gcc/$mpi/bin \
|
||||
--libdir=%{_libdir}/mpi/gcc/$mpi/%_lib \
|
||||
--libdir=%{_libdir}/mpi/gcc/$mpi/%{_lib} \
|
||||
--datadir=%{_libdir}/mpi/gcc/$mpi/share \
|
||||
--includedir=%{_libdir}/mpi/gcc/$mpi/include \
|
||||
--disable-dependency-tracking \
|
||||
@ -861,11 +863,11 @@ done
|
||||
%install
|
||||
# install serial and parallel builds, (the serial one will win in case of
|
||||
# duplicate files)
|
||||
for build_dir in %_mpi build; do
|
||||
make install DESTDIR="%buildroot" -C "$build_dir"
|
||||
for build_dir in %{_mpi} build; do
|
||||
make install DESTDIR=%{buildroot} -C "$build_dir"
|
||||
done
|
||||
|
||||
find "%buildroot/%{_libdir}" -type f -name "*.la" | xargs rm -f
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
find %{buildroot}%{_datadir}/hdf5_examples -type f \
|
||||
| grep -v ".sh$" | xargs chmod 644
|
||||
# delete examples from parallel builds
|
||||
@ -889,40 +891,32 @@ EOF
|
||||
# default timeout is 1200 seconds
|
||||
export HDF5_ALARM_SECONDS=3600
|
||||
%endif
|
||||
make -C build check
|
||||
make %{?_smp_mflags} -C build check
|
||||
export HDF5_Make_Ignore=yes
|
||||
for mpi in %_mpi; do
|
||||
for mpi in %{_mpi}; do
|
||||
make -C $mpi check
|
||||
done
|
||||
|
||||
%post -n libhdf5-%{sonum} -p /sbin/ldconfig
|
||||
%postun -n libhdf5-%{sonum} -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_hl%{sonum_HL} -p /sbin/ldconfig
|
||||
%postun -n libhdf5_hl%{sonum_HL} -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_cpp%{sonum_CXX} -p /sbin/ldconfig
|
||||
%postun -n libhdf5_cpp%{sonum_CXX} -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_hl_cpp%{sonum_HL_CXX} -p /sbin/ldconfig
|
||||
%postun -n libhdf5_hl_cpp%{sonum_HL_CXX} -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_fortran%{sonum_F} -p /sbin/ldconfig
|
||||
%postun -n libhdf5_fortran%{sonum_F} -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5hl_fortran%{sonum_HL_F} -p /sbin/ldconfig
|
||||
%postun -n libhdf5hl_fortran%{sonum_HL_F} -p /sbin/ldconfig
|
||||
|
||||
%if 0%{?_openmpi}
|
||||
%post -n libhdf5-%{sonum}-openmpi -p /sbin/ldconfig
|
||||
%postun -n libhdf5-%{sonum}-openmpi -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_hl%{sonum_HL}-openmpi -p /sbin/ldconfig
|
||||
%postun -n libhdf5_hl%{sonum_HL}-openmpi -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_fortran%{sonum_F}-openmpi -p /sbin/ldconfig
|
||||
%postun -n libhdf5_fortran%{sonum_F}-openmpi -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5hl_fortran%{sonum_HL_F}-openmpi -p /sbin/ldconfig
|
||||
%postun -n libhdf5hl_fortran%{sonum_HL_F}-openmpi -p /sbin/ldconfig
|
||||
%endif
|
||||
@ -930,13 +924,10 @@ done
|
||||
%if 0%{?_mvapich2}
|
||||
%post -n libhdf5-%{sonum}-mvapich2 -p /sbin/ldconfig
|
||||
%postun -n libhdf5-%{sonum}-mvapich2 -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_hl%{sonum_HL}-mvapich2 -p /sbin/ldconfig
|
||||
%postun -n libhdf5_hl%{sonum_HL}-mvapich2 -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5_fortran%{sonum_F}-mvapich2 -p /sbin/ldconfig
|
||||
%postun -n libhdf5_fortran%{sonum_F}-mvapich2 -p /sbin/ldconfig
|
||||
|
||||
%post -n libhdf5hl_fortran%{sonum_HL_F}-mvapich2 -p /sbin/ldconfig
|
||||
%postun -n libhdf5hl_fortran%{sonum_HL_F}-mvapich2 -p /sbin/ldconfig
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user