Summary: Hierarchical Data Format Library Name: HDF Version: 4.2r4 Release: %mkrel 4 License: BSD Group: Development/C URL: http://www.hdfgroup.org/ Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}%{version}.tar.gz Patch0: hdf-4.2r3-maxavailfiles.patch Patch1: hdf-4.2r3-ppc.patch Patch2: hdf-4.2r2-sparc.patch Patch3: hdf-4.2r2-s390.patch Patch4: hdf-4.2r4-buffer.patch Patch5: HDF-ppc.patch Patch6: hdf4.2r1-libm.patch Patch7: HDF4.2r4-format_not_a_string_literal_and_no_format_arguments.diff BuildRequires: byacc BuildRequires: flex %if %{mdkversion} > 1020 BuildRequires: gcc-gfortran %else BuildRequires: gcc-g77 %endif BuildRequires: groff BuildRequires: zlib-devel BuildRequires: libjpeg-devel BuildRequires: netcdf-devel Provides: HDF-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description HDF is a multi-object file format that facilitates the transfer of various types of scientific data between machines and operating systems. HDF allows self-definitions of data content and easy extensibility for future enhancements or compatibility with other standard formats. HDF includes Fortran and C calling interfaces, and utilities to prepare raw image of data files or for use with other NCSA software. The HDF library contains interfaces for storing and retrieving compressed or uncompressed 8-bit and 24=bit raster images with palettes, n-Dimensional scientific datasets and binary tables. AN interface is also included that allows arbitrary grouping of other HDF objects. %package util Summary: HDF utilities and test data files Group: Graphics Requires: %{name} = %{version}-%{release} %description util This package contains utilities for HDF data manipulation and test data files. %prep %setup -q -n HDF%{version} %patch0 -p1 -b .maxavailfiles %patch1 -p1 -b .ppc %patch2 -p1 -b .sparc %patch3 -p1 -b .s390 %patch4 -p1 -b .buffer %ifarch ppc %patch5 -p1 -b .ppcold %endif %patch6 -p1 -b .libm %patch7 -p1 -b .format_not_a_string_literal_and_no_format_arguments # Make it lib64 aware find . -name Makefile.in | \ xargs perl -pi -e "s,^(libdir|LIBDIR)\s+=.+,\1 = \\\$(prefix)/%{_lib}," %build %if %{mdkversion} > 1020 export F77=gfortran export FC=gfortran %endif # Build with PIC in case static library is built into a DSO afterwards %ifarch ia64 x86_64 export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC -DPIC -fPIC" export CXXFLAGS=$CFLAGS export FFLAGS="%{optflags}" %else export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" export CXXFLAGS=$CFLAGS export FFLAGS="%{optflags}" %endif %ifarch ppc %configure2_5x --prefix=%{_prefix} i386-unknown-linux \ --enable-production %else %configure2_5x --prefix=%{_prefix} \ --enable-production %endif %make mkdir -p samples cp -a hdf/util/testfiles/* samples %check echo ====================TESTING========================= make CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" FFLAGS="%{optflags}" \ %ifarch ia64 check -k || echo make test failed %else # (tv) disabled b/c one test failed with 'Arithmetic overflow converting # INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option # -fno-range-check': #check %endif echo ====================TESTING END===================== %install rm -rf %{buildroot} %makeinstall_std # remove files already provided by other packages (libjpeg, netcdf, zlib) rm -f %{buildroot}%{_includedir}/{jconfig.h,jerror.h,jmorecfg.h,jpeglib.h} \ %{buildroot}%{_includedir}/{zconf.h,zlib.h} \ %{buildroot}%{_bindir}/{ncdump,ncgen} \ %{buildroot}%{_includedir}/netcdf.{h,inc,f90} \ %{buildroot}%{_mandir}/man1/ncgen.1 \ %{buildroot}%{_mandir}/man1/ncdump.1 mv -f %{buildroot}%{_bindir}/vmake %{buildroot}%{_bindir}/vmake-hdf mkdir -p %{buildroot}%{_datadir}/hdf cp -aR samples %{buildroot}%{_datadir}/hdf/ # remove unpackaged files rm -f %{buildroot}%{_prefix}/man/man1/nc{gen,dump}.1* %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc COPYING README %{_libdir}/libdf.*a %{_libdir}/libmfhdf.*a %{_libdir}/libhdf4.settings %{_includedir}/* %{_mandir}/*/* %files util %defattr(-,root,root) %dir %{_datadir}/hdf %dir %{_datadir}/hdf/samples %{_bindir}/* %attr(644,root,root) %{_datadir}/hdf/samples/*