fe4fbd
%global apiversion 0.12
fe4fbd
fe4fbd
# build conversion tools
fe4fbd
%bcond_with convtools
fe4fbd
# build python3 bindings
fe4fbd
%bcond_with python
fe4fbd
fe4fbd
Name: liborcus
fe4fbd
Version: 0.12.1
fe4fbd
Release: 2%{?dist}
fe4fbd
Summary: Standalone file import filter library for spreadsheet documents
fe4fbd
fe4fbd
License: MPLv2.0
fe4fbd
URL: https://gitlab.com/orcus/orcus
fe4fbd
Source0: http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz
fe4fbd
fe4fbd
BuildRequires: boost-devel
fe4fbd
BuildRequires: doxygen
fe4fbd
%if %{with convtools}
fe4fbd
BuildRequires: help2man
fe4fbd
BuildRequires: pkgconfig(libixion-0.12)
fe4fbd
%endif
fe4fbd
BuildRequires: pkgconfig(mdds-1.2)
fe4fbd
%if %{with python}
fe4fbd
BuildRequires: pkgconfig(python3)
fe4fbd
%endif
fe4fbd
BuildRequires: pkgconfig(zlib)
fe4fbd
fe4fbd
Patch0: 0001-Wtautological-compare-compare-against-the-other-para.patch
fe4fbd
fe4fbd
%description
fe4fbd
%{name} is a standalone file import filter library for spreadsheet
fe4fbd
documents. Currently under development are ODS, XLSX and CSV import
fe4fbd
filters.
fe4fbd
fe4fbd
%if %{with convtools}
fe4fbd
%package model
fe4fbd
Summary: Spreadsheet model for %{name} conversion tools
fe4fbd
Requires: %{name}%{?_isa} = %{version}-%{release}
fe4fbd
fe4fbd
%description model
fe4fbd
The %{name}-model package contains a spreadsheet model used by the
fe4fbd
conversion tools.
fe4fbd
%endif
fe4fbd
fe4fbd
%package devel
fe4fbd
Summary: Development files for %{name}
fe4fbd
Requires: %{name}%{?_isa} = %{version}-%{release}
fe4fbd
fe4fbd
%description devel
fe4fbd
The %{name}-devel package contains libraries and header files for
fe4fbd
developing applications that use %{name}.
fe4fbd
fe4fbd
%package tools
fe4fbd
Summary: Tools for working with %{name}
fe4fbd
Requires: %{name}%{?_isa} = %{version}-%{release}
fe4fbd
fe4fbd
%description tools
fe4fbd
Helper tools for %{name} and converters of various file formats to HTML
fe4fbd
and text.
fe4fbd
fe4fbd
%if %{with python}
fe4fbd
%package python3
fe4fbd
Summary: Python 3 bindings for %{name}
fe4fbd
Requires: %{name}%{?_isa} = %{version}-%{release}
fe4fbd
fe4fbd
%description python3
fe4fbd
Python 3 bindings for %{name}.
fe4fbd
%endif
fe4fbd
fe4fbd
%package doc
fe4fbd
Summary: API documentation for %{name}
fe4fbd
BuildArch: noarch
fe4fbd
fe4fbd
%description doc
fe4fbd
API documentation for %{name}.
fe4fbd
fe4fbd
%prep
fe4fbd
%autosetup -p1
fe4fbd
fe4fbd
%if %{without convtools}
fe4fbd
%global condopts %{?condopts} --disable-spreadsheet-model
fe4fbd
%endif
fe4fbd
%if %{without python}
fe4fbd
%global condopts %{?condopts} --disable-python
fe4fbd
%endif
fe4fbd
fe4fbd
%build
fe4fbd
%configure --disable-debug --disable-silent-rules --disable-static \
fe4fbd
    --disable-werror --with-pic %{?condopts}
fe4fbd
sed -i \
fe4fbd
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
fe4fbd
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
fe4fbd
    libtool
fe4fbd
make %{?_smp_mflags}
fe4fbd
fe4fbd
%install
fe4fbd
make install DESTDIR=%{buildroot}
fe4fbd
rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{python3_sitearch}/*.la
fe4fbd
fe4fbd
%if %{with convtools}
fe4fbd
# create and install man pages
fe4fbd
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fe4fbd
help2man -N -S '%{name} %{version}' -n 'convert a CSV file' -o orcus-csv.1 %{buildroot}/usr/bin/orcus-csv
fe4fbd
help2man -N -S '%{name} %{version}' -n 'convert a Gnumeric file' -o orcus-gnumeric.1 %{buildroot}/usr/bin/orcus-gnumeric
fe4fbd
help2man -N -S '%{name} %{version}' -n 'convert an ODF spreadsheet' -o orcus-ods.1 %{buildroot}/usr/bin/orcus-ods
fe4fbd
help2man -N -S '%{name} %{version}' -n 'transform an XML file' -o orcus-xls-xml.1 %{buildroot}/usr/bin/orcus-xls-xml
fe4fbd
help2man -N -S '%{name} %{version}' -n 'convert a OpenXML spreadsheet' -o orcus-xlsx.1 %{buildroot}/usr/bin/orcus-xlsx
fe4fbd
help2man -N -S '%{name} %{version}' -n 'convert an XML file' -o orcus-xml.1 %{buildroot}/usr/bin/orcus-xml
fe4fbd
install -m 0755 -d %{buildroot}/%{_mandir}/man1
fe4fbd
install -p -m 0644 orcus-*.1 %{buildroot}/%{_mandir}/man1
fe4fbd
%endif
fe4fbd
fe4fbd
# build documentation
fe4fbd
make doc-doxygen
fe4fbd
fe4fbd
%check
fe4fbd
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fe4fbd
make check %{?_smp_mflags}
fe4fbd
fe4fbd
%post -p /sbin/ldconfig
fe4fbd
%postun -p /sbin/ldconfig
fe4fbd
fe4fbd
%if %{with convtools}
fe4fbd
%post model -p /sbin/ldconfig
fe4fbd
%postun model -p /sbin/ldconfig
fe4fbd
%endif
fe4fbd
fe4fbd
%files
fe4fbd
%doc AUTHORS CHANGELOG
fe4fbd
%license LICENSE
fe4fbd
%{_libdir}/%{name}-%{apiversion}.so.*
fe4fbd
%{_libdir}/%{name}-mso-%{apiversion}.so.*
fe4fbd
%{_libdir}/%{name}-parser-%{apiversion}.so.*
fe4fbd
fe4fbd
%if %{with convtools}
fe4fbd
%files model
fe4fbd
%{_libdir}/%{name}-spreadsheet-model-%{apiversion}.so.*
fe4fbd
%endif
fe4fbd
fe4fbd
%files devel
fe4fbd
%{_includedir}/%{name}-%{apiversion}
fe4fbd
%{_libdir}/%{name}-%{apiversion}.so
fe4fbd
%{_libdir}/%{name}-mso-%{apiversion}.so
fe4fbd
%{_libdir}/%{name}-parser-%{apiversion}.so
fe4fbd
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
fe4fbd
%if %{with convtools}
fe4fbd
%{_libdir}/%{name}-spreadsheet-model-%{apiversion}.so
fe4fbd
%{_libdir}/pkgconfig/%{name}-spreadsheet-model-%{apiversion}.pc
fe4fbd
%endif
fe4fbd
fe4fbd
%files tools
fe4fbd
%{_bindir}/orcus-css-dump
fe4fbd
%{_bindir}/orcus-detect
fe4fbd
%{_bindir}/orcus-json
fe4fbd
%{_bindir}/orcus-mso-encryption
fe4fbd
%{_bindir}/orcus-xml-dump
fe4fbd
%{_bindir}/orcus-zip-dump
fe4fbd
%{_bindir}/orcus-yaml
fe4fbd
%if %{with convtools}
fe4fbd
%{_bindir}/orcus-csv
fe4fbd
%{_bindir}/orcus-gnumeric
fe4fbd
%{_bindir}/orcus-ods
fe4fbd
%{_bindir}/orcus-xls-xml
fe4fbd
%{_bindir}/orcus-xlsx
fe4fbd
%{_bindir}/orcus-xml
fe4fbd
%{_mandir}/man1/orcus-csv.1*
fe4fbd
%{_mandir}/man1/orcus-gnumeric.1*
fe4fbd
%{_mandir}/man1/orcus-ods.1*
fe4fbd
%{_mandir}/man1/orcus-xls-xml.1*
fe4fbd
%{_mandir}/man1/orcus-xlsx.1*
fe4fbd
%{_mandir}/man1/orcus-xml.1*
fe4fbd
%endif
fe4fbd
fe4fbd
%if %{with python}
fe4fbd
%files python3
fe4fbd
%{python3_sitearch}/_orcus.so
fe4fbd
%{python3_sitearch}/_orcus_json.so
fe4fbd
%{python3_sitelib}/orcus
fe4fbd
%endif
fe4fbd
fe4fbd
%files doc
fe4fbd
%license LICENSE
fe4fbd
%doc doc/_doxygen/html
fe4fbd
fe4fbd
%changelog
fe4fbd
* Fri Oct 20 2017 David Tardon <dtardon@redhat.com> - 0.12.1-2
fe4fbd
- Related: rhbz#1477101 fix problem found by coverity
fe4fbd
fe4fbd
* Mon Sep 18 2017 David Tardon <dtardon@redhat.com> - 0.12.1-1
fe4fbd
- Resolves: rhbz#1477101 rebase to 0.12.1
fe4fbd
fe4fbd
* Mon May 04 2015 David Tardon <dtardon@redhat.com> - 0.7.0-6
fe4fbd
- Related: rhbz#1207772 add some upstream fixes
fe4fbd
fe4fbd
* Fri Apr 17 2015 David Tardon <dtardon@redhat.com> - 0.7.0-5
fe4fbd
- Resolves: rhbz#1207772 rebase to 0.7.0
fe4fbd
fe4fbd
* Tue Aug 19 2014 David Tardon <dtardon@redhat.com> - 0.5.1-8
fe4fbd
- Resolves: rhbz#1125584 fix build on ppc64le
fe4fbd
fe4fbd
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.5.1-7
fe4fbd
- Mass rebuild 2014-01-24
fe4fbd
fe4fbd
* Tue Jan 21 2014 David Tardon <dtardon@redhat.com> - 0.5.1-6
fe4fbd
- Resolves: rhbz#1041331 liborcus fails to build for ARM (Aarch64)
fe4fbd
  (really this time)
fe4fbd
fe4fbd
* Tue Jan 21 2014 David Tardon <dtardon@redhat.com> - 0.5.1-5
fe4fbd
- Resolves: rhbz#1041331 liborcus fails to build for ARM (Aarch64)
fe4fbd
fe4fbd
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.5.1-4
fe4fbd
- Mass rebuild 2013-12-27
fe4fbd
fe4fbd
* Mon Jun 10 2013 David Tardon <dtardon@redhat.com> - 0.5.1-3
fe4fbd
- trivial changes
fe4fbd
fe4fbd
* Tue May 28 2013 David Tardon <dtardon@redhat.com> - 0.5.1-2
fe4fbd
- build orcus-zip-dump too
fe4fbd
fe4fbd
* Mon May 06 2013 David Tardon <dtardon@redhat.com> - 0.5.1-1
fe4fbd
- new release
fe4fbd
fe4fbd
* Fri Feb 15 2013 Stephan Bergmannn <sbergman@redhat.com> - 0.3.0-5
fe4fbd
- missing boost include
fe4fbd
fe4fbd
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-4
fe4fbd
- Rebuild for Boost-1.53.0
fe4fbd
fe4fbd
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-3
fe4fbd
- Rebuild for Boost-1.53.0
fe4fbd
fe4fbd
* Sat Dec 08 2012 David Tardon <dtardon@redhat.com> - 0.3.0-2
fe4fbd
- a pointless release bump
fe4fbd
fe4fbd
* Fri Dec 07 2012 David Tardon <dtardon@redhat.com> - 0.3.0-1
fe4fbd
- new release
fe4fbd
fe4fbd
* Sun Sep 09 2012 David Tardon <dtardon@redhat.com> - 0.1.0-1
fe4fbd
- initial import