1 |
Summary: Hierarchical Data Format Library |
2 |
Name: HDF |
3 |
Version: 4.2.8 |
4 |
Release: %mkrel 1 |
5 |
License: BSD |
6 |
Group: Development/C |
7 |
URL: http://www.hdfgroup.org/ |
8 |
Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/hdf-%{version}.tar.gz |
9 |
Patch7: HDF4.2r4-format_not_a_string_literal_and_no_format_arguments.diff |
10 |
BuildRequires: byacc |
11 |
BuildRequires: flex |
12 |
BuildRequires: gcc-gfortran |
13 |
BuildRequires: groff |
14 |
BuildRequires: zlib-devel |
15 |
BuildRequires: libjpeg-devel |
16 |
BuildRequires: netcdf-devel |
17 |
Provides: HDF-devel |
18 |
|
19 |
%description |
20 |
HDF is a multi-object file format that facilitates the transfer of various |
21 |
types of scientific data between machines and operating systems. |
22 |
HDF allows self-definitions of data content and easy extensibility for |
23 |
future enhancements or compatibility with other standard formats. |
24 |
HDF includes Fortran and C calling interfaces, and utilities to |
25 |
prepare raw image of data files or for use with other NCSA software. |
26 |
|
27 |
The HDF library contains interfaces for storing and retrieving compressed or |
28 |
uncompressed 8-bit and 24=bit raster images with palettes, |
29 |
n-Dimensional scientific datasets and binary tables. AN interface is also |
30 |
included that allows arbitrary grouping of other HDF objects. |
31 |
|
32 |
%package util |
33 |
Summary: HDF utilities and test data files |
34 |
Group: Graphics |
35 |
Requires: %{name} = %{version}-%{release} |
36 |
|
37 |
%description util |
38 |
This package contains utilities for HDF data manipulation and |
39 |
test data files. |
40 |
|
41 |
%prep |
42 |
|
43 |
%setup -q -n hdf-%{version} |
44 |
%patch7 -p1 -b .format_not_a_string_literal_and_no_format_arguments |
45 |
|
46 |
# Make it lib64 aware |
47 |
find . -name Makefile.in | \ |
48 |
xargs perl -pi -e "s,^(libdir|LIBDIR)\s+=.+,\1 = \\\$(prefix)/%{_lib}," |
49 |
|
50 |
%build |
51 |
export F77=gfortran |
52 |
export FC=gfortran |
53 |
|
54 |
# Build with PIC in case static library is built into a DSO afterwards |
55 |
%ifarch ia64 x86_64 |
56 |
export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC -DPIC -fPIC" |
57 |
export CXXFLAGS=$CFLAGS |
58 |
export FFLAGS="%{optflags}" |
59 |
%else |
60 |
export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" |
61 |
export CXXFLAGS=$CFLAGS |
62 |
export FFLAGS="%{optflags}" |
63 |
%endif |
64 |
|
65 |
%configure2_5x --prefix=%{_prefix} \ |
66 |
--enable-production |
67 |
%make |
68 |
|
69 |
mkdir -p samples |
70 |
cp -a hdf/util/testfiles/* samples |
71 |
|
72 |
%check |
73 |
echo ====================TESTING========================= |
74 |
make CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" FFLAGS="%{optflags}" \ |
75 |
%ifarch ia64 |
76 |
check -k || echo make test failed |
77 |
%else |
78 |
# (tv) disabled b/c one test failed with 'Arithmetic overflow converting |
79 |
# INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option |
80 |
# -fno-range-check': |
81 |
#check |
82 |
%endif |
83 |
echo ====================TESTING END===================== |
84 |
|
85 |
|
86 |
|
87 |
%install |
88 |
rm -rf %{buildroot} |
89 |
%makeinstall_std |
90 |
# remove files already provided by other packages (libjpeg, netcdf, zlib) |
91 |
rm -f %{buildroot}%{_includedir}/{jconfig.h,jerror.h,jmorecfg.h,jpeglib.h} \ |
92 |
%{buildroot}%{_includedir}/{zconf.h,zlib.h} \ |
93 |
%{buildroot}%{_bindir}/{ncdump,ncgen} \ |
94 |
%{buildroot}%{_includedir}/netcdf.{h,inc,f90} \ |
95 |
%{buildroot}%{_mandir}/man1/ncgen.1 \ |
96 |
%{buildroot}%{_mandir}/man1/ncdump.1 |
97 |
mv -f %{buildroot}%{_bindir}/vmake %{buildroot}%{_bindir}/vmake-hdf |
98 |
mkdir -p %{buildroot}%{_datadir}/hdf |
99 |
cp -aR samples %{buildroot}%{_datadir}/hdf/ |
100 |
|
101 |
# remove unpackaged files |
102 |
rm -f %{buildroot}%{_prefix}/man/man1/nc{gen,dump}.1* |
103 |
|
104 |
%files |
105 |
%doc COPYING README.txt |
106 |
%{_libdir}/libdf.*a |
107 |
%{_libdir}/libmfhdf.*a |
108 |
%{_libdir}/libhdf4.settings |
109 |
%{_includedir}/* |
110 |
%{_mandir}/*/* |
111 |
|
112 |
%files util |
113 |
%dir %{_datadir}/hdf |
114 |
%dir %{_datadir}/hdf/samples |
115 |
%{_bindir}/* |
116 |
%attr(644,root,root) %{_datadir}/hdf/samples/* |
117 |
|
118 |
|