3ccdab
%global apiversion 0.8
3ccdab
3ccdab
# build conversion tools
3ccdab
%bcond_with convtools
4b2d23
4b2d23
Name: liborcus
3ccdab
Version: 0.7.0
3ccdab
Release: 6%{?dist}
4b2d23
Summary: Standalone file import filter library for spreadsheet documents
4b2d23
3ccdab
License: MPLv2.0
3ccdab
URL: https://gitlab.com/orcus/orcus
4b2d23
Source: http://kohei.us/files/orcus/src/%{name}-%{version}.tar.bz2
4b2d23
4b2d23
BuildRequires: boost-devel
3ccdab
BuildRequires: chrpath
3ccdab
%if %{with convtools}
3ccdab
BuildRequires: help2man
3ccdab
BuildRequires: pkgconfig(libixion-0.8)
3ccdab
%endif
3ccdab
BuildRequires: pkgconfig(mdds)
3ccdab
BuildRequires: pkgconfig(zlib)
3ccdab
3ccdab
Patch0: 0001-fix-invalid-memory-access-in-base64-functions.patch
3ccdab
Patch1: 0001-coverity-54426-missing-break-in-switch-statement.patch
3ccdab
Patch2: 0001-coverity-54448-Uninitialized-scalar-field.patch
3ccdab
Patch3: 0001-do-not-let-main-throw.patch
487451
4b2d23
%description
4b2d23
%{name} is a standalone file import filter library for spreadsheet
4b2d23
documents. Currently under development are ODS, XLSX and CSV import
4b2d23
filters.
4b2d23
3ccdab
%if %{with convtools}
3ccdab
%package model
3ccdab
Summary: Spreadsheet model for %{name} conversion tools
3ccdab
Requires: %{name}%{?_isa} = %{version}-%{release}
3ccdab
3ccdab
%description model
3ccdab
The %{name}-model package contains a spreadsheet model used by the
3ccdab
conversion tools.
3ccdab
%endif
3ccdab
4b2d23
%package devel
4b2d23
Summary: Development files for %{name}
4b2d23
Requires: %{name}%{?_isa} = %{version}-%{release}
4b2d23
4b2d23
%description devel
4b2d23
The %{name}-devel package contains libraries and header files for
4b2d23
developing applications that use %{name}.
4b2d23
4b2d23
%package tools
4b2d23
Summary: Tools for working with %{name}
4b2d23
Requires: %{name}%{?_isa} = %{version}-%{release}
4b2d23
4b2d23
%description tools
3ccdab
Helper tools for %{name} and converters of various file formats to HTML
3ccdab
and text.
4b2d23
4b2d23
%prep
3ccdab
%autosetup -p1
3ccdab
3ccdab
%if %{without convtools}
3ccdab
%global condopts --disable-spreadsheet-model
3ccdab
%endif
4b2d23
4b2d23
%build
4b2d23
%configure --disable-debug --disable-silent-rules --disable-static \
3ccdab
    --disable-werror --with-pic %{?condopts}
4b2d23
sed -i \
4b2d23
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
4b2d23
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
4b2d23
    libtool
4b2d23
make %{?_smp_mflags}
4b2d23
3ccdab
%if %{with convtools}
3ccdab
export LD_LIBRARY_PATH=`pwd`/src/liborcus/.libs:`pwd`/src/parser/.libs:`pwd`/src/spreadsheet/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
3ccdab
help2man -N -n 'convert a CSV file' -o orcus-csv.1 ./src/.libs/orcus-csv
3ccdab
help2man -N -n 'convert a Gnumeric file' -o orcus-gnumeric.1 ./src/.libs/orcus-gnumeric
3ccdab
help2man -N -n 'convert an ODF spreadsheet' -o orcus-ods.1 ./src/.libs/orcus-ods
3ccdab
help2man -N -n 'transform an XML file' -o orcus-xls-xml.1 ./src/.libs/orcus-xls-xml
3ccdab
help2man -N -n 'convert a OpenXML spreadsheet' -o orcus-xlsx.1 ./src/.libs/orcus-xlsx
3ccdab
help2man -N -n 'convert an XML file' -o orcus-xml.1 ./src/.libs/orcus-xml
3ccdab
%endif
3ccdab
4b2d23
%install
4b2d23
make install DESTDIR=%{buildroot}
4b2d23
rm -f %{buildroot}/%{_libdir}/*.la
3ccdab
# because boost.m4 is total crap and adds RPATH unconditionally
3ccdab
chrpath -d %{buildroot}/%{_libdir}/*.so
3ccdab
3ccdab
%if %{with convtools}
3ccdab
install -m 0755 -d %{buildroot}/%{_mandir}/man1
3ccdab
install -p -m 0644 orcus-*.1 %{buildroot}/%{_mandir}/man1
3ccdab
%endif
4b2d23
4b2d23
%check
3ccdab
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
4b2d23
make check %{?_smp_mflags}
4b2d23
4b2d23
%post -p /sbin/ldconfig
4b2d23
%postun -p /sbin/ldconfig
4b2d23
3ccdab
%if %{with convtools}
3ccdab
%post model -p /sbin/ldconfig
3ccdab
%postun model -p /sbin/ldconfig
3ccdab
%endif
3ccdab
4b2d23
%files
4b2d23
%doc AUTHORS COPYING README
4b2d23
%{_libdir}/%{name}-%{apiversion}.so.*
4b2d23
%{_libdir}/%{name}-mso-%{apiversion}.so.*
4b2d23
%{_libdir}/%{name}-parser-%{apiversion}.so.*
4b2d23
3ccdab
%if %{with convtools}
3ccdab
%files model
3ccdab
%{_libdir}/%{name}-spreadsheet-model-%{apiversion}.so.*
3ccdab
%endif
3ccdab
4b2d23
%files devel
4b2d23
%{_includedir}/%{name}-%{apiversion}
4b2d23
%{_libdir}/%{name}-%{apiversion}.so
4b2d23
%{_libdir}/%{name}-mso-%{apiversion}.so
4b2d23
%{_libdir}/%{name}-parser-%{apiversion}.so
4b2d23
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
3ccdab
%if %{with convtools}
3ccdab
%{_libdir}/%{name}-spreadsheet-model-%{apiversion}.so
3ccdab
%{_libdir}/pkgconfig/%{name}-spreadsheet-model-%{apiversion}.pc
3ccdab
%endif
4b2d23
4b2d23
%files tools
3ccdab
%{_bindir}/orcus-detect
4b2d23
%{_bindir}/orcus-mso-encryption
4b2d23
%{_bindir}/orcus-xml-dump
4b2d23
%{_bindir}/orcus-zip-dump
3ccdab
%if %{with convtools}
3ccdab
%{_bindir}/orcus-csv
3ccdab
%{_bindir}/orcus-gnumeric
3ccdab
%{_bindir}/orcus-ods
3ccdab
%{_bindir}/orcus-xls-xml
3ccdab
%{_bindir}/orcus-xlsx
3ccdab
%{_bindir}/orcus-xml
3ccdab
%{_mandir}/man1/orcus-csv.1*
3ccdab
%{_mandir}/man1/orcus-gnumeric.1*
3ccdab
%{_mandir}/man1/orcus-ods.1*
3ccdab
%{_mandir}/man1/orcus-xls-xml.1*
3ccdab
%{_mandir}/man1/orcus-xlsx.1*
3ccdab
%{_mandir}/man1/orcus-xml.1*
3ccdab
%endif
4b2d23
4b2d23
%changelog
3ccdab
* Mon May 04 2015 David Tardon <dtardon@redhat.com> - 0.7.0-6
3ccdab
- Related: rhbz#1207772 add some upstream fixes
3ccdab
3ccdab
* Fri Apr 17 2015 David Tardon <dtardon@redhat.com> - 0.7.0-5
3ccdab
- Resolves: rhbz#1207772 rebase to 0.7.0
3ccdab
3ccdab
* Tue Aug 19 2014 David Tardon <dtardon@redhat.com> - 0.5.1-8
3ccdab
- Resolves: rhbz#1125584 fix build on ppc64le
3ccdab
487451
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.5.1-7
487451
- Mass rebuild 2014-01-24
487451
487451
* Tue Jan 21 2014 David Tardon <dtardon@redhat.com> - 0.5.1-6
487451
- Resolves: rhbz#1041331 liborcus fails to build for ARM (Aarch64)
487451
  (really this time)
487451
487451
* Tue Jan 21 2014 David Tardon <dtardon@redhat.com> - 0.5.1-5
487451
- Resolves: rhbz#1041331 liborcus fails to build for ARM (Aarch64)
487451
487451
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.5.1-4
487451
- Mass rebuild 2013-12-27
487451
4b2d23
* Mon Jun 10 2013 David Tardon <dtardon@redhat.com> - 0.5.1-3
4b2d23
- trivial changes
4b2d23
4b2d23
* Tue May 28 2013 David Tardon <dtardon@redhat.com> - 0.5.1-2
4b2d23
- build orcus-zip-dump too
4b2d23
4b2d23
* Mon May 06 2013 David Tardon <dtardon@redhat.com> - 0.5.1-1
4b2d23
- new release
4b2d23
4b2d23
* Fri Feb 15 2013 Stephan Bergmannn <sbergman@redhat.com> - 0.3.0-5
4b2d23
- missing boost include
4b2d23
4b2d23
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-4
4b2d23
- Rebuild for Boost-1.53.0
4b2d23
4b2d23
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-3
4b2d23
- Rebuild for Boost-1.53.0
4b2d23
4b2d23
* Sat Dec 08 2012 David Tardon <dtardon@redhat.com> - 0.3.0-2
4b2d23
- a pointless release bump
4b2d23
4b2d23
* Fri Dec 07 2012 David Tardon <dtardon@redhat.com> - 0.3.0-1
4b2d23
- new release
4b2d23
4b2d23
* Sun Sep 09 2012 David Tardon <dtardon@redhat.com> - 0.1.0-1
4b2d23
- initial import