File hdf5.spec of Package hdf5

#
# spec file for package hdf5 (Version 1.8.2)
#
# Copyright (c) 2009 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


Name:           hdf5
Version:        1.8.5.1
%define upver   1.8.5-patch1
Release:        1
Summary:        Hierarchical Data File Format Version 5
License:        Apache-like
Group:          Development/Libraries/Parallel
Url:            http://www.hdfgroup.org/HDF5/
Source0:        %{name}-%{upver}.tar.bz2
Patch2:         %{name}-%{version}-build.patch
Patch3:         %{name}-%{version}-noreturn.patch
Patch4:         %{name}-%{version}-lib64.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes gcc-c++ gcc-fortran krb5-devel openssl-devel zlib-devel

%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 libhdf5-0
Summary:        Hierarchical Data File Format Version 5
Group:          Development/Libraries/Parallel

%description -n libhdf5-0
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 libhdf5_hl0
Summary:        Hierarchical Data File Format Version 5
Group:          Development/Libraries/Parallel

%description -n libhdf5_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.



Authors:
--------
    University of Illinois, HDF group
    helpdesk@hdfgroup.org

%package -n libhdf5-devel
Summary:        Hierarchical Data File Format Version 5
Group:          Development/Libraries/Parallel
Provides:       hdf-devel = %{version}
Obsoletes:      hdf-devel < %{version}
Requires:       libhdf5-0 = %{version}
Requires:       libhdf5_hl0 = %{version}

%description -n libhdf5-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.


Authors:
--------
    University of Illinois, HDF group
    helpdesk@hdfgroup.org

%package examples
Summary:        Examples for HDF5
Group:          Development/Libraries/Parallel
Requires:       libhdf5-0 = %{version}
Requires:       libhdf5_hl0 = %{version}

%description examples
Examples of HDF5 library use.


Authors:
--------
    University of Illinois, HDF group
    helpdesk@hdfgroup.org


%prep
%setup -q -n %{name}-%{upver}
%patch2
%patch3
%patch4

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" 
export CPPFLAGS="$RPM_OPT_FLAGS"
export F9X=gfortran CXX=g++
%configure \
    --with-ssl \
    --enable-cxx \
    --enable-fortran \
    --with-pthread \
    --disable-static \
    --with-pic
%{__make} %{?jobs:-j%jobs}

%install
%makeinstall docdir=${RPM_BUILD_ROOT}%{_docdir}
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la $RPM_BUILD_ROOT/%{_libdir}/*.settings
# Fortran modules
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gfortran/modules
mv $RPM_BUILD_ROOT%{_includedir}/*.mod $RPM_BUILD_ROOT%{_libdir}/gfortran/modules/
find $RPM_BUILD_ROOT%{_datadir}/hdf5_examples -type f | grep -v ".sh$" | xargs chmod 644
%fdupes -s $RPM_BUILD_ROOT%{_datadir}

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libhdf5-0 -p /sbin/ldconfig

%postun -n libhdf5-0 -p /sbin/ldconfig

%post -n libhdf5_hl0 -p /sbin/ldconfig

%postun -n libhdf5_hl0 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc COPYING MANIFEST README.txt release_docs/RELEASE.txt release_docs/HISTORY-1_0-1_8_0_rc3.txt release_docs/HISTORY-1_8.txt release_docs/RELEASE.txt
%{_bindir}/*

%files -n libhdf5-0
%defattr(0755,root,root)
%{_libdir}/libhdf5.so.*
%{_libdir}/libhdf5_cpp.so.*
%{_libdir}/libhdf5_fortran.so.*

%files -n libhdf5_hl0
%defattr(0755,root,root)
%{_libdir}/libhdf5_hl.so.*
%{_libdir}/libhdf5_hl_cpp.so.*
%{_libdir}/libhdf5hl_fortran.so.*

%files -n libhdf5-devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/*.so
%dir %{_libdir}/gfortran
%dir %{_libdir}/gfortran/modules
%{_libdir}/gfortran/modules/*.mod

%files examples
%defattr(-,root,root)
%{_datadir}/hdf5_examples

%changelog
openSUSE Build Service is sponsored by