%define _pkgname hdf5 %define approot /opt/hdf5/openmpi %define _modroot /usr/share/Modules/modulefiles/hdf5 %define debug_package %{nil} Name: hdf5-openmpi-gnu Version: 1.8.1 Release: 3 Summary: A general purpose library and file format for storing scientific data License: Distributable Group: System Environment/Libraries URL: http://www.hdfgroup.org/HDF5/ Source: %{name}-%{version}.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: zlib-devel gcc openmpi-interconnects-gnu Requires: zlib zlib-devel gcc openmpi-interconnects-gnu %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. %prep %setup -q -n %{name} %build tar xzf %{_pkgname}-%{version}.tar.gz cd %{_pkgname}-%{version} export CC=/opt/openmpi/gnu/bin/mpicc export FC=/opt/openmpi/gnu/bin/mpif90 export LD_LIBRARY_PATH=/opt/openmpi/gnu/lib:$LD_LIBRARY_PATH ./configure --prefix=%{approot} --enable-shared --enable-fortran make %clean rm -rf $RPM_BUILD_ROOT %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{approot} ( cd %{_pkgname}-%{version} make prefix=$RPM_BUILD_ROOT%{approot} install ) install -D -m 0644 %{name}-module %{buildroot}%{_modroot}/%{name} %post %postun %files %defattr(-, root, root) %{approot} %{_modroot}/%{name} %changelog * Mon Nov 24 2008 Mehdi Bozzo-Rey 1.8.1-3 * Mon Jun 2 2008 Mike Frisch 1.6.6-2 - Add missing copyright * Tue Sep 12 2007 Tsai Li Ming 1.6.6-1 - Initial package.