Summary: Hierarchical Data Format library
Summary(pl.UTF-8): Biblioteka HDF (Hierarchical Data Format)
Name: hdf
-Version: 4.2.7
+Version: 4.2.15
Release: 1
Epoch: 1
Group: Libraries
License: Nearly BSD, but changed sources must be marked
-Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/hdf-%{version}.tar.bz2
-# Source0-md5: 5217b131bfe04a16fc2acad4645b79dc
+Source0: https://support.hdfgroup.org/ftp/HDF/releases/HDF%{version}/src/hdf-%{version}.tar.bz2
+# Source0-md5: 27ab87b22c31906883a0bfaebced97cb
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
# Source1-md5: 607df78cacc131b37dfdb443e61e789a
Patch0: %{name}-shared.patch
-Patch1: %{name}-opt.patch
-Patch2: %{name}-morearchs.patch
-Patch3: %{name}-link.patch
-URL: http://hdf.ncsa.uiuc.edu/
+Patch1: %{name}-morearchs.patch
+Patch2: %{name}-link.patch
+Patch3: %{name}-szip.patch
+Patch4: %{name}-tirpc.patch
+URL: http://portal.hdfgroup.org/display/HDF4/HDF4
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: bison
BuildRequires: gcc-fortran
BuildRequires: groff
BuildRequires: libjpeg-devel >= 6b
+BuildRequires: libtirpc-devel
BuildRequires: libtool >= 2:1.4d-3
-BuildRequires: netcdf-devel
+BuildRequires: rpmbuild(macros) >= 1.750
%{?with_szip:BuildRequires: szip-devel >= 2.0}
BuildRequires: which
BuildRequires: zlib-devel >= 1.1.4
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: libjpeg-devel >= 6b
+Requires: libtirpc-devel
%{?with_szip:Requires: szip-devel >= 2.0}
Requires: zlib-devel >= 1.1.4
%description progs -l pl.UTF-8
Narzędzia do konwersji z i do formatu HDF.
+%package examples
+Summary: HDF example programs (source code)
+Summary(pl.UTF-8): Przykładowe programy dla biblioteki HDF (w postaci źródłowej)
+Group: Documentation
+
+%description examples
+HDF example programs (source code).
+
+%description examples -l pl.UTF-8
+Przykładowe programy dla biblioteki HDF (w postaci źródłowej).
+
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
-
-# evil -R
-sed -i '/^if HDF_BUILD_XDR/,/^endif/d;/^if HDF_BUILD_SHARED/,/^endif/d' config/commence.am
+%patch4 -p1
%build
%{__libtoolize}
%{__autoheader}
%{__automake}
# need to pass F77 to override F77=g77 in config/linux-gnu
+%ifarch x32
+%define gfortran x86_64-pld-linux-gnux32-gfortran
+%else
+%define gfortran %{_target_cpu}-pld-linux-gfortran
+%endif
%configure \
- F77="%{_target_cpu}-pld-linux-gfortran" \
+ F77="%{gfortran}" \
+%if "%{_ver_ge '%(%{gfortran} -dumpversion)' '10.0'}" == "1"
+ FFLAGS="%{rpmcflags} -fallow-argument-mismatch" \
+%endif
--enable-shared \
%{?with_szip:--with-szlib}
install -d $RPM_BUILD_ROOT{%{_mandir}/man{3,7},%{_includedir}/hdf}
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ EXAMPLETOPDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
+ EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c \
-mv -f $RPM_BUILD_ROOT%{_includedir}/*.{h,inc,f90} $RPM_BUILD_ROOT%{_includedir}/hdf
+%{__mv} $RPM_BUILD_ROOT%{_includedir}/*.{h,inc,f90} $RPM_BUILD_ROOT%{_includedir}/hdf
-install man/gr_chunk.3 $RPM_BUILD_ROOT%{_mandir}/man3
-mv -f $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7
+cp -p man/gr_chunk.3 $RPM_BUILD_ROOT%{_mandir}/man3
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7
# resolve conflict with netcdf
for i in ncdump ncgen ; do
- mv -f $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i
- mv -f $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1
+ %{__mv} $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i
+ %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1
done
bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
%{_mandir}/man1/ristosds.1*
%{_mandir}/man1/vmake.1*
%{_mandir}/man1/vshow.1*
+
+%files examples
+%defattr(644,root,root,755)
+%dir %{_examplesdir}/%{name}-%{version}
+%{_examplesdir}/%{name}-%{version}/README
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/run-all-ex.sh
+%dir %{_examplesdir}/%{name}-%{version}/c
+%{_examplesdir}/%{name}-%{version}/c/*.c
+%{_examplesdir}/%{name}-%{version}/c/*.f
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/c/run-c-ex.sh
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/c/run-fortran-ex.sh