File hdf5.spec of Package hdf5
#
# spec file for package hdf5 (Version 1.8.2)
#
# Copyright (c) 2009-2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
# norootforbuild
%define hdf5_libver 0
%define libname libhdf5
Name: hdf5
Version: 1.8.7
Release: 0
Summary: A general purpose library and file format for storing scientific data
License: BSD
Group: Development/Libraries/Other
Url: http://www.hdfgroup.org/HDF5/
Source0: %{name}-%{version}.tar.bz2
Source1: h5comp
Patch1: %{name}-build.patch
Patch2: %{name}-noreturn.patch
Patch3: %{name}-lib64.patch
Patch4: %{name}-gcc44-O3.patch
# Patch7: hdf5-fix_type_punning.patch
# Patch8: hdf5-make_vars_cachable.patch
Patch5: %{name}-longdouble.patch
Patch6: %{name}-multiarch.patch
Patch7: %{name}-tstlite.patch
Patch8: %{name}-implicits.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: krb5-devel, openssl-devel, zlib-devel, gcc-fortran, gcc-c++,
BuildRequires: fdupes
%description
The HDF project involves the development and support of software and
file formats for scientific data management. The HDF software includes
I/O libraries and tools for analyzing, visualizing, and converting
scientific data.
Authors:
--------
University of Illinois, HDF group
helpdesk@hdfgroup.org
%package -n %{libname}-%{hdf5_libver}
Summary: HDF 5 runtime libraries
Group: Development/Libraries/C and C++
%description -n %{libname}-%{hdf5_libver}
The HDF project involves the development and support of software and
file formats for scientific data management. The HDF software includes
I/O libraries and tools for analyzing, visualizing, and converting
scientific data.
This package contains the HDF 5 runtime libraries.
Authors:
--------
University of Illinois, HDF group
helpdesk@hdfgroup.org
%package -n %{libname}_hl%{hdf5_libver}
Summary: HDF 5 runtimelibraries
Group: Development/Libraries/Parallel
%description -n %{libname}_hl0
The HDF project involves the development and support of software and
file formats for scientific data management. The HDF software includes
I/O libraries and tools for analyzing, visualizing, and converting
scientific data.
This package contains the HDF 5 runtime libraries.
Authors:
--------
University of Illinois, HDF group
helpdesk@hdfgroup.org
%package devel
Summary: Hierarchical Data File Format Version 5
Group: Development/Libraries/Parallel
Requires: %{name} = %{version}
Requires: %{libname}-0 = %{version}
Requires: %{libname}_hl0 = %{version}
%description devel
The HDF project involves the development and support of software and
file formats for scientific data management. The HDF software includes
I/O libraries and tools for analyzing, visualizing, and converting
scientific data.
This package contains all files needed to create projects that use
hdf5.
Authors:
--------
University of Illinois, HDF group
helpdesk@hdfgroup.org
%package devel-static
Summary: Hierarchical Data File Format Version 5 - static libraries
Group: Development/Libraries/C and C++
Requires: hdf5-devel
%description devel-static
The HDF project involves the development and support of software and
file formats for scientific data management. The HDF software includes
I/O libraries and tools for analyzing, visualizing, and converting
scientific data.
This package provides the static libraries.
Authors:
--------
University of Illinois, HDF group
helpdesk@hdfgroup.org
%package examples
Summary: Examples for HDF5
Group: Development/Libraries/Parallel
Requires: %{libname}-0 = %{version}
Requires: %{libname}_hl0 = %{version}
%description examples
Examples of HDF5 library use.
%prep
%setup -q
%patch1 -p1 -b .build
%patch2 -p1 -b .noreturn
%patch3 -p1 -b .lib64
%patch4 -p1 -b .gcc44-O3
%ifarch ppc64
%patch5 -p1 -b .longdouble
%endif
%patch6 -p1 -b .muiltarch
%patch7 -p1 -b .tstlite
%patch8 -p1 -b .implicits
#This should be fixed in 1.8.7
find \( -name '*.[ch]*' -o -name '*.f90' -o -name '*.txt' \) -exec chmod -x {} +
%build
# autoreconf -fi
export CC=gcc
export CXX=g++
export F9X=gfortran
# export CFLAGS="%%{optflags} -fno-strict-aliasing"
# export CPPFLAGS="%%{optflags}"
%configure \
--disable-dependency-tracking \
--enable-cxx \
--enable-fortran \
--enable-hl \
--with-pthread \
--with-zlib=/usr \
--with-ssl \
--with-pic
## Multiarch header
%ifarch x86_64 ppc64 ia64 s390x sparc64 alpha
cp src/H5pubconf.h \
src/H5pubconf-64.h
%else
cp src/H5pubconf.h \
src/H5pubconf-32.h
%endif
# %%{__make} %%{?_smp_mflags}
%{__make} %{?jobs:-j%jobs}
%install
%makeinstall docdir=%{buildroot}%{_docdir}
rm -rf %{buildroot}/%{_libdir}/*.la %{buildroot}/%{_libdir}/*.settings
find %{buildroot}%{_datadir}/hdf5_examples -type f \
| grep -v ".sh$" | xargs chmod 644
%fdupes -s %{buildroot}/%{_datadir}
## Fixup headers and scripts for multiarch
%ifarch x86_64 ppc64 ia64 s390x sparc64 alpha
mv %{buildroot}%{_includedir}/H5pubconf.h \
%{buildroot}%{_includedir}/H5pubconf-64.h
for x in h5c++ h5cc h5fc
do
mv %{buildroot}%{_bindir}/${x} \
%{buildroot}%{_bindir}/${x}-64
install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x}
done
%else
mv %{buildroot}%{_includedir}/H5pubconf.h \
%{buildroot}%{_includedir}/H5pubconf-32.h
for x in h5c++ h5cc h5fc
do
mv %{buildroot}%{_bindir}/${x} \
%{buildroot}%{_bindir}/${x}-32
install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x}
done
%endif
%check
make check
%clean
rm -rf %{buildroot}
%post -n %{libname}-0 -p /sbin/ldconfig
%postun -n %{libname}-0 -p /sbin/ldconfig
%post -n %{libname}_hl0 -p /sbin/ldconfig
%postun -n %{libname}_hl0 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING MANIFEST README.txt release_docs/RELEASE.txt
%doc release_docs/HISTORY-1_0-1_8_0_rc3.txt release_docs/HISTORY-1_8.txt
%doc release_docs/RELEASE.txt
%{_bindir}/*
%files -n %{libname}-%{hdf5_libver}
%defattr(0755,root,root)
%{_libdir}/libhdf5.so.*
%{_libdir}/libhdf5_cpp.so.*
%{_libdir}/libhdf5_fortran.so.*
%files -n libhdf5_hl%{hdf5_libver}
%defattr(0755,root,root)
%{_libdir}/libhdf5_hl.so.*
%{_libdir}/libhdf5_hl_cpp.so.*
%{_libdir}/libhdf5hl_fortran.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/*.so
%{_includedir}/*.mod
%files devel-static
%defattr(-,root,root,-)
%{_libdir}/*.a
%files examples
%defattr(-,root,root)
%{_datadir}/hdf5_examples
%changelog