%define _libdir64 %{_prefix}/lib64 %define _fmoddir %{_libdir}/fortran/modules Name: hdf5 Version: 1.8.17 Release: 1 Summary: A general purpose library and file format for storing scientific data License: BSD Group: System Environment/Libraries URL: http://www.hdfgroup.org/HDF5/ Source0: http://www.hdfgroup.org/ftp/HDF5/current/src/%{name}-%{version}.tar.bz2 Source1: http://www.hdfgroup.org/ftp/HDF5/current/src/%{name}-%{version}.md5 Source2: H5pubconf.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: zlib-devel >= 1.2.3-7 Requires: zlib >= 1.2.3-7 %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. The library is available as 32-bit and 64-bit. %package devel Summary: HDF5 development files Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: zlib-devel >= 1.2.3-7 %description devel HDF5 development headers and libraries. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --disable-dependency-tracking \ --enable-fortran \ --enable-cxx \ --enable-shared --disable-static \ --enable-production \ --enable-hl make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --disable-dependency-tracking \ --enable-fortran \ --enable-cxx \ --enable-shared --disable-static \ --enable-production \ --enable-hl make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make install DESTDIR=${RPM_BUILD_ROOT} mv ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf.h \ ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf-ppc64.h ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install mv ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf.h \ ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf-ppc32.h /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : # Fortran modules mkdir -p ${RPM_BUILD_ROOT}%{_fmoddir} mv ${RPM_BUILD_ROOT}%{_includedir}/*.mod ${RPM_BUILD_ROOT}%{_fmoddir} # install architecture dependent header file cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_includedir}/ chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/*.h ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so* for f in _cpp _fortran _hl _hl_cpp hl_fortran ; do /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}${f}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}${f}.so* done ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/COPYING 32bit/MANIFEST 32bit/README.txt 32bit/release_docs/RELEASE.txt %doc 32bit/release_docs/HISTORY*.txt %{_bindir}/gif2h5* %{_bindir}/h52gif* %{_bindir}/h5copy* %{_bindir}/h5debug* %{_bindir}/h5diff* %{_bindir}/h5dump* %{_bindir}/h5import* %{_bindir}/h5jam* %{_bindir}/h5ls* %{_bindir}/h5mkgrp* %{_bindir}/h5perf_serial* %{_bindir}/h5repack* %{_bindir}/h5repart* %{_bindir}/h5stat* %{_bindir}/h5unjam* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/bin/gif2h5* /usr/bin/h52gif* /usr/bin/h5copy* /usr/bin/h5debug* /usr/bin/h5diff* /usr/bin/h5dump* /usr/bin/h5import* /usr/bin/h5jam* /usr/bin/h5ls* /usr/bin/h5mkgrp* /usr/bin/h5perf_serial* /usr/bin/h5repack* /usr/bin/h5repart* /usr/bin/h5stat* /usr/bin/h5unjam* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_bindir}/h5c++* %{_bindir}/h5cc* %{_bindir}/h5fc* %{_bindir}/h5redeploy* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/*.settings %{_libdir64}/*.settings %{_fmoddir}/*.mod %{_datadir}/hdf5_examples/ /usr/bin/h5c++* /usr/bin/h5cc* /usr/bin/h5fc* /usr/bin/h5redeploy* /usr/lib/*.la /usr/lib64/*.la /usr/include/* %changelog * Tue Sep 20 2016 Michael Perzl - 1.8.17-1 - updated to version 1.8.17 * Mon Jan 04 2016 Michael Perzl - 1.8.16-1 - updated to version 1.8.16 * Thu Dec 11 2014 Michael Perzl - 1.8.14-1 - updated to version 1.8.14 * Mon Aug 25 2014 Michael Perzl - 1.8.13-1 - updated to version 1.8.13 * Fri Feb 07 2014 Michael Perzl - 1.8.12-1 - updated to version 1.8.12 * Mon Jul 08 2013 Michael Perzl - 1.8.11-1 - updated to version 1.8.11 * Tue Jan 08 2013 Michael Perzl - 1.8.10-1 - updated to version 1.8.10 * Tue Jun 12 2012 Michael Perzl - 1.8.9-1 - updated to version 1.8.9 * Wed Nov 30 2011 Michael Perzl - 1.8.8-1 - updated to version 1.8.8 * Tue Jul 19 2011 Michael Perzl - 1.8.7-1 - first version for AIX V5.1 and higher