f612e4
%global apiversion 0.0
f612e4
f612e4
Name: libstaroffice
f612e4
Version: 0.0.6
f612e4
Release: 1%{?dist}
f612e4
Summary: A library for import of binary StarOffice documents
f612e4
f612e4
License: MPLv2.0 or LGPLv2+
f612e4
URL: https://github.com/fosnola/libstaroffice/wiki
f612e4
Source: https://github.com/fosnola/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
f612e4
f612e4
BuildRequires: doxygen
f612e4
BuildRequires: gcc-c++
f612e4
BuildRequires: help2man
f612e4
BuildRequires: pkgconfig(librevenge-0.0)
f612e4
BuildRequires: pkgconfig(librevenge-generators-0.0)
f612e4
BuildRequires: pkgconfig(librevenge-stream-0.0)
f612e4
BuildRequires: pkgconfig(zlib)
f612e4
f612e4
%description
f612e4
%{name} is a library for import of binary StarOffice documents.
f612e4
f612e4
%package devel
f612e4
Summary: Development files for %{name}
f612e4
Requires: %{name}%{?_isa} = %{version}-%{release}
f612e4
f612e4
%description devel
f612e4
The %{name}-devel package contains libraries and header files for
f612e4
developing applications that use %{name}.
f612e4
f612e4
%package doc
f612e4
Summary: Documentation of %{name} API
f612e4
BuildArch: noarch
f612e4
f612e4
%description doc
f612e4
The %{name}-doc package contains documentation files for %{name}.
f612e4
f612e4
%package tools
f612e4
Summary: Tools to transform StarOffice documents into other formats
f612e4
Requires: %{name}%{?_isa} = %{version}-%{release}
f612e4
f612e4
%description tools
f612e4
Tools to transform StarOffice documents into other formats. Currently
f612e4
supported: CSV, HTML, plain text, SVG, raw.
f612e4
f612e4
%prep
f612e4
%autosetup -p1
f612e4
f612e4
%build
f612e4
%configure --disable-static --disable-werror --disable-silent-rules \
f612e4
    --enable-zip
f612e4
sed -i \
f612e4
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
f612e4
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
f612e4
    libtool
f612e4
make %{?_smp_mflags}
f612e4
f612e4
%install
f612e4
%make_install
f612e4
rm -f %{buildroot}/%{_libdir}/*.la
f612e4
# rhbz#1001245 we install API docs directly from build
f612e4
rm -rf %{buildroot}/%{_docdir}/%{name}
f612e4
f612e4
# generate and install man pages
f612e4
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
f612e4
for tool in sd2raw sd2svg sd2text sdc2csv sdw2html; do
f612e4
    help2man -N -S '%{name} %{version}' -o ${tool}.1 %{buildroot}%{_bindir}/${tool}
f612e4
done
f612e4
install -m 0755 -d %{buildroot}/%{_mandir}/man1
f612e4
install -m 0644 sd2*.1 sd?2*.1 %{buildroot}/%{_mandir}/man1
f612e4
f612e4
%post -p /sbin/ldconfig
f612e4
%postun -p /sbin/ldconfig
f612e4
f612e4
%files
f612e4
%doc CREDITS NEWS README
f612e4
%license COPYING.LGPL COPYING.MPL
f612e4
%{_libdir}/%{name}-%{apiversion}.so.*
f612e4
f612e4
%files devel
f612e4
%doc ChangeLog
f612e4
%{_includedir}/%{name}-%{apiversion}
f612e4
%{_libdir}/%{name}-%{apiversion}.so
f612e4
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
f612e4
f612e4
%files doc
f612e4
%license COPYING.LGPL COPYING.MPL
f612e4
%doc docs/doxygen/html
f612e4
f612e4
%files tools
f612e4
%{_bindir}/sdw2html
f612e4
%{_bindir}/sd2raw
f612e4
%{_bindir}/sd2svg
f612e4
%{_bindir}/sd2text
f612e4
%{_bindir}/sdc2csv
f612e4
%{_mandir}/man1/sdw2html.1*
f612e4
%{_mandir}/man1/sd2raw.1*
f612e4
%{_mandir}/man1/sd2svg.1*
f612e4
%{_mandir}/man1/sd2text.1*
f612e4
%{_mandir}/man1/sdc2csv.1*
f612e4
f612e4
%changelog
f612e4
* Thu Apr 26 2018 David Tardon <dtardon@redhat.com> - 0.0.6-1
f612e4
- new upstream release
f612e4
f612e4
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-2
f612e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f612e4
f612e4
* Tue Nov 07 2017 David Tardon <dtardon@redhat.com> - 0.0.5-1
f612e4
- new upstream release
f612e4
f612e4
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-3
f612e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f612e4
f612e4
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-2
f612e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f612e4
f612e4
* Sun Jul 16 2017 David Tardon <dtardon@redhat.com> - 0.0.4-1
f612e4
- new upstream release
f612e4
f612e4
* Tue Jun 06 2017 David Tardon <dtardon@redhat.com> - 0.0.3-3
f612e4
- Resolves: rhbz#1458800 CVE-2017-9432 Stack-buffer overflow in the
f612e4
  StarWriterStruct::DatabaseName::read
f612e4
f612e4
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-2
f612e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
f612e4
f612e4
* Wed Feb 22 2017 David Tardon <dtardon@redhat.com> - 0.0.3-1
f612e4
- new upstream release
f612e4
f612e4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-2
f612e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f612e4
f612e4
* Thu Aug 11 2016 David Tardon <dtardon@redhat.com> - 0.0.2-1
f612e4
- new upstream release
f612e4
f612e4
* Thu Feb 11 2016 David Tardon <dtardon@redhat.com> - 0.0.1-1
f612e4
- initial import