03d7c1
%global apiversion 0.16
03d7c1
03d7c1
%if 0%{?rhel}
03d7c1
03d7c1
# build conversion tools
03d7c1
%bcond_with convtools
03d7c1
# build python3 bindings
03d7c1
%bcond_with python
03d7c1
03d7c1
%else
03d7c1
# build conversion tools
03d7c1
%bcond_without convtools
03d7c1
# build python3 bindings
03d7c1
%bcond_without python
03d7c1
03d7c1
%endif
03d7c1
03d7c1
Name: liborcus
03d7c1
Version: 0.16.1
03d7c1
Release: 8%{?dist}
03d7c1
Summary: Standalone file import filter library for spreadsheet documents
03d7c1
03d7c1
License: MPLv2.0
03d7c1
URL: https://gitlab.com/orcus/orcus
03d7c1
Source0: https://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz
03d7c1
Patch0:  %{name}-gcc11.patch
03d7c1
Patch1:  liborcus-noexamples.patch
03d7c1
03d7c1
BuildRequires: make
03d7c1
BuildRequires: boost-devel
03d7c1
BuildRequires: doxygen
03d7c1
BuildRequires: gcc-c++
03d7c1
BuildRequires: automake
03d7c1
%if %{with convtools}
03d7c1
BuildRequires: help2man
03d7c1
BuildRequires: pkgconfig(libixion-0.16)
03d7c1
%endif
03d7c1
BuildRequires: pkgconfig(mdds-1.5)
03d7c1
%if %{with python}
03d7c1
BuildRequires: pkgconfig(python3)
03d7c1
%if 0%{?rhel}
03d7c1
BuildRequires: python3
03d7c1
%endif
03d7c1
%endif
03d7c1
BuildRequires: pkgconfig(zlib)
03d7c1
03d7c1
%description
03d7c1
%{name} is a standalone file import filter library for spreadsheet
03d7c1
documents. Currently under development are ODS, XLSX and CSV import
03d7c1
filters.
03d7c1
03d7c1
%if %{with convtools}
03d7c1
%package model
03d7c1
Summary: Spreadsheet model for %{name} conversion tools
03d7c1
Requires: %{name}%{?_isa} = %{version}-%{release}
03d7c1
03d7c1
%description model
03d7c1
The %{name}-model package contains a spreadsheet model used by the
03d7c1
conversion tools.
03d7c1
%endif
03d7c1
03d7c1
%package devel
03d7c1
Summary: Development files for %{name}
03d7c1
Requires: %{name}%{?_isa} = %{version}-%{release}
03d7c1
03d7c1
%description devel
03d7c1
The %{name}-devel package contains libraries and header files for
03d7c1
developing applications that use %{name}.
03d7c1
03d7c1
%package tools
03d7c1
Summary: Tools for working with %{name}
03d7c1
Requires: %{name}%{?_isa} = %{version}-%{release}
03d7c1
03d7c1
%description tools
03d7c1
Helper tools for %{name} and converters of various file formats to HTML
03d7c1
and text.
03d7c1
03d7c1
%if %{with python}
03d7c1
%package python3
03d7c1
Summary: Python 3 bindings for %{name}
03d7c1
Requires: %{name}%{?_isa} = %{version}-%{release}
03d7c1
03d7c1
%description python3
03d7c1
Python 3 bindings for %{name}.
03d7c1
%endif
03d7c1
03d7c1
%package doc
03d7c1
Summary: API documentation for %{name}
03d7c1
BuildArch: noarch
03d7c1
03d7c1
%description doc
03d7c1
API documentation for %{name}.
03d7c1
03d7c1
%prep
03d7c1
%autosetup -p1
03d7c1
03d7c1
%if %{without convtools}
03d7c1
%global condopts %{?condopts} --disable-spreadsheet-model
03d7c1
%endif
03d7c1
%if %{without python}
03d7c1
%global condopts %{?condopts} --disable-python
03d7c1
%endif
03d7c1
03d7c1
%build
03d7c1
autoreconf
03d7c1
%configure --disable-debug --disable-silent-rules --disable-static \
03d7c1
    --disable-werror --with-pic %{?condopts}
03d7c1
sed -i \
03d7c1
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
03d7c1
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
03d7c1
    libtool
03d7c1
%make_build
03d7c1
03d7c1
%install
03d7c1
%make_install
03d7c1
rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{python3_sitearch}/*.la
03d7c1
03d7c1
%if %{with convtools}
03d7c1
# create and install man pages
03d7c1
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
03d7c1
help2man -N -S '%{name} %{version}' -n 'convert a CSV file' -o orcus-csv.1 %{buildroot}%{_bindir}/orcus-csv
03d7c1
help2man -N -S '%{name} %{version}' -n 'convert a Gnumeric file' -o orcus-gnumeric.1 %{buildroot}%{_bindir}/orcus-gnumeric
03d7c1
help2man -N -S '%{name} %{version}' -n 'convert an ODF spreadsheet' -o orcus-ods.1 %{buildroot}%{_bindir}/orcus-ods
03d7c1
help2man -N -S '%{name} %{version}' -n 'transform an XML file' -o orcus-xls-xml.1 %{buildroot}%{_bindir}/orcus-xls-xml
03d7c1
help2man -N -S '%{name} %{version}' -n 'convert a OpenXML spreadsheet' -o orcus-xlsx.1 %{buildroot}%{_bindir}/orcus-xlsx
03d7c1
help2man -N -S '%{name} %{version}' -n 'convert an XML file' -o orcus-xml.1 %{buildroot}%{_bindir}/orcus-xml
03d7c1
install -m 0755 -d %{buildroot}/%{_mandir}/man1
03d7c1
install -p -m 0644 orcus-*.1 %{buildroot}/%{_mandir}/man1
03d7c1
%endif
03d7c1
03d7c1
# build documentation
03d7c1
make doc-doxygen
03d7c1
03d7c1
%check
03d7c1
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
03d7c1
make check %{?_smp_mflags}
03d7c1
03d7c1
%ldconfig_scriptlets
03d7c1
03d7c1
%if %{with convtools}
03d7c1
%ldconfig_scriptlets model
03d7c1
%endif
03d7c1
03d7c1
%files
03d7c1
%doc AUTHORS CHANGELOG
03d7c1
%license LICENSE
03d7c1
%{_libdir}/%{name}-%{apiversion}.so.*
03d7c1
%{_libdir}/%{name}-mso-%{apiversion}.so.*
03d7c1
%{_libdir}/%{name}-parser-%{apiversion}.so.*
03d7c1
03d7c1
%if %{with convtools}
03d7c1
%files model
03d7c1
%{_libdir}/%{name}-spreadsheet-model-%{apiversion}.so.*
03d7c1
%endif
03d7c1
03d7c1
%files devel
03d7c1
%{_includedir}/%{name}-%{apiversion}
03d7c1
%{_libdir}/%{name}-%{apiversion}.so
03d7c1
%{_libdir}/%{name}-mso-%{apiversion}.so
03d7c1
%{_libdir}/%{name}-parser-%{apiversion}.so
03d7c1
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
03d7c1
%if %{with convtools}
03d7c1
%{_libdir}/%{name}-spreadsheet-model-%{apiversion}.so
03d7c1
%{_libdir}/pkgconfig/%{name}-spreadsheet-model-%{apiversion}.pc
03d7c1
%endif
03d7c1
03d7c1
%files tools
03d7c1
%{_bindir}/orcus-css-dump
03d7c1
%{_bindir}/orcus-detect
03d7c1
%{_bindir}/orcus-json
03d7c1
%{_bindir}/orcus-mso-encryption
03d7c1
%{_bindir}/orcus-zip-dump
03d7c1
%{_bindir}/orcus-yaml
03d7c1
%if %{with convtools}
03d7c1
%{_bindir}/orcus-csv
03d7c1
%{_bindir}/orcus-gnumeric
03d7c1
%{_bindir}/orcus-ods
03d7c1
%{_bindir}/orcus-styles-ods
03d7c1
%{_bindir}/orcus-xls-xml
03d7c1
%{_bindir}/orcus-xlsx
03d7c1
%{_bindir}/orcus-xml
03d7c1
%{_mandir}/man1/orcus-csv.1*
03d7c1
%{_mandir}/man1/orcus-gnumeric.1*
03d7c1
%{_mandir}/man1/orcus-ods.1*
03d7c1
%{_mandir}/man1/orcus-xls-xml.1*
03d7c1
%{_mandir}/man1/orcus-xlsx.1*
03d7c1
%{_mandir}/man1/orcus-xml.1*
03d7c1
%endif
03d7c1
03d7c1
%if %{with python}
03d7c1
%files python3
03d7c1
%{python3_sitearch}/_orcus.so
03d7c1
%{python3_sitearch}/_orcus_json.so
03d7c1
%{python3_sitelib}/orcus
03d7c1
%endif
03d7c1
03d7c1
%files doc
03d7c1
%license LICENSE
03d7c1
%doc doc/_doxygen/html
03d7c1
03d7c1
%changelog
03d7c1
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.16.1-8
03d7c1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
03d7c1
  Related: rhbz#1991688
03d7c1
03d7c1
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.16.1-7
03d7c1
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
03d7c1
03d7c1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-6
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
03d7c1
03d7c1
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 0.16.1-5
03d7c1
- Rebuilt for Boost 1.75
03d7c1
03d7c1
* Tue Dec 08 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.1-4
03d7c1
- fix build without libixion under rhel
03d7c1
03d7c1
* Wed Dec 02 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.1-3
03d7c1
- build without libixion under rhel
03d7c1
03d7c1
* Mon Oct 19 2020 Jeff Law <law@redhat.com> - 0.16.1-2
03d7c1
- Fix missing headers for gcc-11
03d7c1
03d7c1
* Tue Sep 29 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.1-1
03d7c1
- latest release
03d7c1
03d7c1
* Fri Sep 25 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.0-3
03d7c1
- reenable make check
03d7c1
03d7c1
* Fri Sep 25 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.0-2
03d7c1
- replace -DSIZEOF_VOID_P=4 with upstream solution
03d7c1
03d7c1
* Thu Sep 24 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.0-1
03d7c1
- latest release
03d7c1
03d7c1
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.3-6
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
03d7c1
03d7c1
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 0.15.3-5
03d7c1
- Use make macros
03d7c1
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
03d7c1
03d7c1
* Thu May 28 2020 Jonathan Wakely <jwakely@redhat.com> - 0.15.3-4
03d7c1
- Rebuilt for Boost 1.73
03d7c1
03d7c1
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-3
03d7c1
- Rebuilt for Python 3.9
03d7c1
03d7c1
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.3-2
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
03d7c1
03d7c1
* Sat Nov 02 2019 David Tardon <dtardon@redhat.com> - 0.15.3-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.2-2
03d7c1
- Rebuilt for Python 3.8.0rc1 (#1748018)
03d7c1
03d7c1
* Thu Aug 29 2019 Caolán McNamara <caolanm@redhat.com> - 0.15.2-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Tue Aug 20 2019 Caolán McNamara <caolanm@redhat.com> - 0.15.0-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-6
03d7c1
- Rebuilt for Python 3.8
03d7c1
03d7c1
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-5
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
03d7c1
03d7c1
* Fri Apr 05 2019 Stephan Bergmann <sbergman@redhat.com> - 0.14.1-4
03d7c1
- Replace hard-coded /usr/bin with _bindir macro for flatpak build
03d7c1
03d7c1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-3
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
03d7c1
03d7c1
* Fri Jan 25 2019 Jonathan Wakely <jwakely@redhat.com> - 0.14.1-2
03d7c1
- Rebuilt for Boost 1.69
03d7c1
03d7c1
* Fri Oct 26 2018 David Tardon <dtardon@redhat.com> - 0.14.1-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Sun Sep 02 2018 David Tardon <dtardon@redhat.com> - 0.14.0-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.4-3
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
03d7c1
03d7c1
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 0.13.4-2
03d7c1
- Rebuilt for Python 3.7
03d7c1
03d7c1
* Wed Feb 28 2018 David Tardon <dtardon@redhat.com> - 0.13.4-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Sat Feb 17 2018 David Tardon <dtardon@redhat.com> - 0.13.3-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.2-2
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
03d7c1
03d7c1
* Wed Jan 31 2018 David Tardon <dtardon@redhat.com> - 0.13.2-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Tue Jan 23 2018 Jonathan Wakely <jwakely@redhat.com> - 0.13.1-2
03d7c1
- Rebuilt for Boost 1.66
03d7c1
03d7c1
* Mon Nov 20 2017 David Tardon <dtardon@redhat.com> - 0.13.1-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-7
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
03d7c1
03d7c1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-6
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
03d7c1
03d7c1
* Fri Jul 21 2017 Kalev Lember <klember@redhat.com> - 0.12.1-5
03d7c1
- Rebuilt for Boost 1.64
03d7c1
03d7c1
* Wed Feb 15 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.12.1-4
03d7c1
- Rebuild for brp-python-bytecompile
03d7c1
03d7c1
* Tue Feb 07 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-3
03d7c1
- Rebuilt for Boost 1.63
03d7c1
- Fix build and directory ownership
03d7c1
03d7c1
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.12.1-2
03d7c1
- Rebuild for Python 3.6
03d7c1
03d7c1
* Thu Sep 29 2016 David Tardon <dtardon@redhat.com> - 0.12.1-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Wed Jul 20 2016 David Tardon <dtardon@redhat.com> - 0.11.2-2
03d7c1
- rebuild for libixion 0.12
03d7c1
03d7c1
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-1
03d7c1
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
03d7c1
03d7c1
* Mon Mar 14 2016 David Tardon <dtardon@redhat.com> - 0.11.1-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Tue Mar 08 2016 David Tardon <dtardon@redhat.com> - 0.11.0-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Sun Feb 14 2016 David Tardon <dtardon@redhat.com> - 0.9.2-4
03d7c1
- switch to new mdds and libixion
03d7c1
03d7c1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-3
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
03d7c1
03d7c1
* Sat Jan 16 2016 Jonathan Wakely <jwakely@redhat.com> - 0.9.2-2
03d7c1
- Rebuilt for Boost 1.60
03d7c1
03d7c1
* Mon Oct 19 2015 David Tardon <dtardon@redhat.com> - 0.9.2-1
03d7c1
- rebase to the 0.9.x line
03d7c1
03d7c1
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.7.1-7
03d7c1
- Rebuilt for Boost 1.59
03d7c1
03d7c1
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-6
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
03d7c1
03d7c1
* Fri Jul 24 2015 Adam Williamson <awilliam@redhat.com> - 0.7.1-5
03d7c1
- rebuild for Boost 1.58 (for f23, for real this time)
03d7c1
03d7c1
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 0.7.1-4
03d7c1
- rebuild for Boost 1.58
03d7c1
03d7c1
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-3
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
03d7c1
03d7c1
* Tue Apr 14 2015 David Tardon <dtardon@redhat.com> - 0.7.1-2
03d7c1
- rebuild for yet another C++ ABI break
03d7c1
03d7c1
* Wed Feb 25 2015 David Tardon <dtardon@redhat.com> - 0.7.1-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 0.7.0-7
03d7c1
- include <iostream> in string_pool_test (liborcus-0.7.0-iostream.patch)
03d7c1
03d7c1
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 0.7.0-6
03d7c1
- Rebuild for boost 1.57.0
03d7c1
03d7c1
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-5
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
03d7c1
03d7c1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-4
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
03d7c1
03d7c1
* Thu May 29 2014 David Tardon <dtardon@redhat.com> - 0.7.0-3
03d7c1
- enable conversion tools
03d7c1
03d7c1
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 0.7.0-2
03d7c1
- Rebuild for boost 1.55.0
03d7c1
03d7c1
* Thu May 22 2014 David Tardon <dtardon@redhat.com> - 0.7.0-1
03d7c1
- new upstream release
03d7c1
03d7c1
* Mon May 05 2014 Jaromir Capik <jcapik@redhat.com> - 0.5.1-7
03d7c1
- add support for ppc64le
03d7c1
03d7c1
* Wed Jan 22 2014 David Tardon <dtardon@redhat.com> - 0.5.1-6
03d7c1
- add support for aarch64
03d7c1
03d7c1
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
03d7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
03d7c1
03d7c1
* Sat Jul 27 2013 pmachata@redhat.com - 0.5.1-4
03d7c1
- Rebuild for boost 1.54.0
03d7c1
03d7c1
* Mon Jun 10 2013 David Tardon <dtardon@redhat.com> - 0.5.1-3
03d7c1
- trivial changes
03d7c1
03d7c1
* Tue May 28 2013 David Tardon <dtardon@redhat.com> - 0.5.1-2
03d7c1
- build orcus-zip-dump too
03d7c1
03d7c1
* Mon May 06 2013 David Tardon <dtardon@redhat.com> - 0.5.1-1
03d7c1
- new release
03d7c1
03d7c1
* Fri Feb 15 2013 Stephan Bergmannn <sbergman@redhat.com> - 0.3.0-5
03d7c1
- missing boost include
03d7c1
03d7c1
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-4
03d7c1
- Rebuild for Boost-1.53.0
03d7c1
03d7c1
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-3
03d7c1
- Rebuild for Boost-1.53.0
03d7c1
03d7c1
* Sat Dec 08 2012 David Tardon <dtardon@redhat.com> - 0.3.0-2
03d7c1
- a pointless release bump
03d7c1
03d7c1
* Fri Dec 07 2012 David Tardon <dtardon@redhat.com> - 0.3.0-1
03d7c1
- new release
03d7c1
03d7c1
* Sun Sep 09 2012 David Tardon <dtardon@redhat.com> - 0.1.0-1
03d7c1
- initial import