From 63e06769d671a286d91a64920b8134e5926af59a Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 8 Nov 2019 21:43:44 -0700 Subject: [PATCH] Move compile scripts to hdf-devel and allow multilib install (bz#1769326) Split shared libraries into hdf-libs sub-package --- h4comp | 6 ++++++ hdf.spec | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 h4comp diff --git a/h4comp b/h4comp new file mode 100644 index 0000000..aeb861b --- /dev/null +++ b/h4comp @@ -0,0 +1,6 @@ +#!/bin/bash + +BITS=32 +[ -d /usr/lib64 ] && BITS=64 + +exec $0-${BITS} "$@" diff --git a/hdf.spec b/hdf.spec index 3a540ae..c6508f4 100644 --- a/hdf.spec +++ b/hdf.spec @@ -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 - 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 - 4.2.14-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild