Move compile scripts to hdf-devel and allow multilib install (bz#1769326)

Split shared libraries into hdf-libs sub-package
This commit is contained in:
Orion Poplawski 2019-11-08 21:43:44 -07:00
parent 3a6fc8f089
commit 63e06769d6
2 changed files with 49 additions and 2 deletions

6
h4comp Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
BITS=32
[ -d /usr/lib64 ] && BITS=64
exec $0-${BITS} "$@"

View File

@ -4,11 +4,12 @@
Name: hdf
Version: 4.2.14
Release: 5%{?dist}
Release: 6%{?dist}
Summary: A general purpose library and file format for storing scientific data
License: BSD
URL: https://portal.hdfgroup.org/
Source0: https://support.hdfgroup.org/ftp/HDF/releases/HDF%{version}/src/%{name}-%{version}.tar.bz2
Source1: h4comp
Patch0: hdf-4.2.5-maxavailfiles.patch
Patch1: hdf-ppc.patch
Patch2: hdf-4.2.4-sparc.patch
@ -42,6 +43,7 @@ BuildRequires: javapackages-tools
BuildRequires: hamcrest
BuildRequires: junit
BuildRequires: slf4j
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
@ -57,7 +59,7 @@ grids. You can also mix and match them in HDF4 files according to your needs.
%package devel
Summary: HDF4 development files
Provides: %{name}-static = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: libjpeg-devel%{?_isa}
Requires: libtirpc-devel%{?_isa}
Requires: zlib-devel%{?_isa}
@ -66,6 +68,13 @@ Requires: zlib-devel%{?_isa}
HDF4 development headers and libraries.
%package libs
Summary: HDF4 shared libraries
%description libs
HDF4 shared libraries.
%package static
Summary: HDF4 static libraries
Requires: %{name}-devel = %{version}-%{release}
@ -186,6 +195,29 @@ touch -c -r h4config.h h4config.h.tmp
mv h4config.h.tmp h4config.h
popd
#Fixup headers and scripts for multiarch
%if %{_lib} == lib64
#sed -i -e s/H5pubconf.h/H5pubconf-64.h/ %{buildroot}%{_includedir}/H5public.h
#mv %{buildroot}%{_includedir}/H5pubconf.h \
#%{buildroot}%{_includedir}/H5pubconf-64.h
for x in h4cc h4fc
do
mv %{buildroot}%{_bindir}/${x} \
%{buildroot}%{_bindir}/${x}-64
install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x}
done
%else
#sed -i -e s/H5pubconf.h/H5pubconf-32.h/ %{buildroot}%{_includedir}/H5public.h
#mv %{buildroot}%{_includedir}/H5pubconf.h \
#%{buildroot}%{_includedir}/H5pubconf-32.h
for x in h4cc h4fc
do
mv %{buildroot}%{_bindir}/${x} \
%{buildroot}%{_bindir}/${x}-32
install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x}
done
%endif
%check
make -j1 -C build-shared check
@ -197,15 +229,20 @@ make -j1 -C build-static check
%{_pkgdocdir}/
%exclude %{_pkgdocdir}/examples
%{_bindir}/*
%exclude %{_bindir}/h4?c*
%{_libdir}/*.so.0*
%{_mandir}/man1/*.gz
%files devel
%{_bindir}/h4?c*
%{_includedir}/%{name}/
%{_libdir}/*.so
%{_libdir}/*.settings
%{_pkgdocdir}/examples/
%files libs
%{_libdir}/*.so.0*
%files static
%{_libdir}/*.a
@ -215,6 +252,10 @@ make -j1 -C build-static check
%changelog
* Fri Nov 8 2019 Orion Poplawski <orion@nwra.com> - 4.2.14-6
- Move compile scripts to hdf-devel and allow multilib install (bz#1769326)
- Split shared libraries into hdf-libs sub-package
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild