File hdf5.spec of Package hdf5

Name: 		hdf5
Version: 	1.6.5
Release: 	0
Summary: 	A general purpose library and file format for storing scientific data
License: 	BSD-ish
Group: 		System Environment/Libraries
Packager:	Ben Haggaer

URL: 		http://www.hdfgroup.org/HDF5/
Source0: 	ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/src/%{name}-%{version}.tar.gz
Patch0:		hdf5-1.6.4-gcc4.patch
Patch1:		hdf5-1.6.4-destdir.patch
Patch2:		hdf5-1.6.4-norpath.patch
Patch3:		hdf5-1.6.4-testh5repack.patch
Patch4:		hdf5-1.6.5-h5diff_attr.patch
Patch5:		hdf5-1.6.4-ppc.patch
Patch6:		hdf5-1.6.5-flags.patch
Patch7:		hdf5-1.6.5-x86_64.patch
Patch8:		hdf5-1.6.5-sort.patch
Patch9:		h5c++.in.patch
Patch10:	hdf5-1.6.5-gcc42flags.patch

BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root

Autoreqprov:    On
BuildRequires: 	gcc-c++ krb5-devel, openssl-devel, zlib-devel gcc-fortran

%description
HDF5 is a general purpose library and file format for storing scientific data.
HDF5 can store two primary objects: datasets and groups. A dataset is 
essentially a multidimensional array of data elements, and a group is a 
structure for organizing objects in an HDF5 file. Using these two basic 
objects, one can create and store almost any kind of scientific data 
structure, such as images, arrays of vectors, and structured and unstructured 
grids. You can also mix and match them in HDF5 files according to your needs.

%package devel
Summary: 	HDF5 development files
Group: 		Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
HDF5 development headers and libraries.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1 -b .flags
%patch7 -p1 -b .x86_64
%patch8 -p1 -b .sort
%patch9 -p1
%patch10 -p1

%build
%if %suse_version <= 1000
%configure --with-ssl --enable-cxx \
           --enable-threadsafe --with-pthread
%else
%configure --with-ssl --enable-cxx --enable-fortran \
           --enable-threadsafe --with-pthread
%endif

%{__make}

%install
find doc/html -type f -exec chmod -x {} \;
%makeinstall docdir=${RPM_BUILD_ROOT}%{_docdir}
find doc/html -name Dependencies -o -name Makefile\* -exec rm {} \;
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la $RPM_BUILD_ROOT/%{_libdir}/*.settings
# Don't install h5perf until h5test.so.0 issues is sorted out
rm $RPM_BUILD_ROOT/%{_bindir}/h5perf

%check
make check

%clean
rm -rf $RPM_BUILD_ROOT

%post 
%run_ldconfig

%postun 
%run_ldconfig

%files
%defattr(-,root,root,-)
%doc COPYING MANIFEST README.txt release_docs/RELEASE.txt
%doc release_docs/HISTORY.txt doc/html
%{_bindir}/gif2h5
%{_bindir}/h52gif
%{_bindir}/h5debug
%{_bindir}/h5diff
%{_bindir}/h5dump
%{_bindir}/h5import
%{_bindir}/h5jam
%{_bindir}/h5ls
%{_bindir}/h5repack
%{_bindir}/h5repart
%{_bindir}/h5unjam
%attr(0755,root,root) %{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%{_bindir}/h5c++
%{_bindir}/h5cc
%{_bindir}/h5redeploy
%{_docdir}/%{name}/
%{_includedir}/*.h
%{_libdir}/*.a
%{_libdir}/*.so
%if %suse_version > 1000
%{_bindir}/h5fc
%{_libdir}/*.mod
%endif

%changelog
* Wed Aug 08 2007 Ben Haggaer
- added h5c++.in.patch from install site
  added hdf5-1.6.5-gcc42flags.patch to avoid 'make check' fail
* Thu May 24 2007 Werner Hoch <werner.ho@gmx.de>
- initial specfile mostly taken from
  hdf5-1.6.5-7.fc7.src.rpm 
openSUSE Build Service is sponsored by