Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 4108ef2c254955113403a6fae935e28b > files > 3

hdf5-1.6.4-2mdk.src.rpm

%define name	hdf5
%define major	0
%define libname %mklibname hdf5_ %{major}
%define version 1.6.4
%define fversion 1.6.4
%define release 2mdk

Summary:	HDF5 library
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	Distributable (see included COPYING)
Group:		System/Libraries
Source0:	ftp://hdf.ncsa.uiuc.edu/HDF5/%{name}-%{version}/src/%{name}-%{fversion}.tar.bz2
Patch0:		hdf5-1.6.4-cflags.patch.bz2
URL:		http://hdf.ncsa.uiuc.edu/HDF5/
BuildRequires:	libjpeg-static-devel
BuildRequires:	openssl-devel
BuildRequires:	zlib-devel
Requires:	%{libname} = %{version}-%{release}
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
HDF5 is a library and file format for storing scientific data. It was
designed to address some of the limitations of the HDF 4.x library and to
address current and anticipated requirements of modern systems and
applications. HDF5 includes the following improvements.

   - A new file format designed to address some of the deficiencies of
     HDF4.x, particularly the need to store larger files and more
     objects per file.
   - A simpler, more comprehensive data model that includes only two
     basic structures: a multidimensional array of record structures,
     and a grouping structure.
   - A simpler, better-engineered library and API, with improved
     support for parallel i/o, threads, and other requirements imposed
     by modern systems and applications.


%package -n %{libname}
Summary:	HDF5 development libraries
Group:		System/Libraries

%description -n %{libname}
This package contains the libraries needed to run programs dynamically
linked with hdf5 libraries.

%package -n %{libname}-devel
Summary:	Static libraries and header files for hdf5 development
Group:		Development/C
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Requires:	%{libname} = %{version}

%description -n %{libname}-devel
This package provides static libraries and header files needed
for develop applications requiring the "hdf5" library.

%prep
%setup -q -n %{name}-%{fversion}
%patch0 -p1 -b .cflags

%build
find $RPM_BUILD_ROOT -type f -size 0 -name Dependencies -print |xargs rm -f
find $RPM_BUILD_ROOT -type f -size 0 -name .depend -print |xargs rm -f 

OPT_FLAGS="$RPM_OPT_FLAGS -O1 -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wpadded"
%ifarch %{ix86} x86_64
OPT_FLAGS="$OPT_FLAGS -mieee-fp"
%endif

# (gb) 1.4.2-2mdk: "2.96" still deficient wrt. C++ exception handling on ia32
%ifarch %ix86
OPT_FLAGS=`echo "$OPT_FLAGS -fno-omit-frame-pointer" | sed -e "s/-fomit-frame-pointer//g"`
%endif

# (gb) 1.4.2-2mdk: constants merging causes troubles with long doubles on ia64
%ifarch ia64
OPT_FLAGS="$OPT_FLAGS -fno-merge-constants"
%endif

CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" \
./configure --prefix=%{_prefix} \
	--enable-cxx \
	--enable-stream-vfd \
	--with-hdf4=/usr/include \
	--enable-linux-lfs \
	--disable-rpath
make

# all tests must pass on the following architectures
%ifarch %{ix86} x86_64
make check
%else
make -k check || echo "make check failed"
%endif

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}
%makeinstall
rm -rf $RPM_BUILD_ROOT%{_prefix}/doc

%multiarch_includes $RPM_BUILD_ROOT%{_includedir}/H5pubconf.h

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

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

%files -n %{libname}
%defattr(-,root,root,755)
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/*.settings
%{_includedir}/*
%multiarch %{multiarch_includedir}/*.h

%changelog
* Sat Aug 06 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.6.4-2mdk
- -mieee-fp is a x86 specific option

* Thu Aug 05 2005 Giuseppe Ghibò <ghibo@mandriva.com> 1.6.4-1mdk
- Release: 1.6.4.
- Lower optimization to -O1 to get tests passing (as were failing with -O2).

* Thu Feb 10 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.6.3-1mdk
- Relase 1.6.3.
- Rediff Patch0.

* Wed Feb  9 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.5-3mdk
- multiarch

* Sat Oct 02 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.5-2mdk
- Don't use %%configure as it doesn't work anymore.
- Rebuilt.

* Thu Aug 07 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.5-1mdk
- Release: 1.4.5.

* Tue Aug  5 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.4-3mdk
- mklibname

* Wed Feb 19 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.4-2mdk
- Fixed %%doc files.
- enabled 64bit LFS.

* Sun Nov 10 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.4-1mdk
- Updated to release 1.4.4.
- Disabled 1.2 compatibility.

* Mon Nov  4 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.2p1-3mdk
- Make check in %%build stage.
- Rebuild with latest gcc to avoid miscompilation.

* Sun Jul 21 2002 Stefan van der Eijk <stefan@eijk.nu> 1.4.2p1-2mdk
- BuildRequires.

* Tue Nov 27 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.2p1-1mdk
- updated to release 1.4.2-patch1.

* Thu Aug 30 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.2-2mdk
- Clean spec file
- Patch0: give precedence to C[XX]FLAGS set in the spec file
- Avoid -fomit-frame-pointer on ia32
- Disable constants merging (add -fno-merge-constants to C[XX]FLAGS)
  since it causes troubles with long doubles on ia64. Surprising, eh ?

* Tue Aug 21 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.2-1mdk
- update to release 1.4.2.

* Wed Jul 25 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.1-2mdk
- added a lib Requires in main package.

* Wed Jul 25 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.4.1-1mdk
- initial release for version hdf5.