2476ad7
%global apiversion 0.0
2476ad7
2476ad7
Name: libstaroffice
714620b
Version: 0.0.2
2476ad7
Release: 1%{?dist}
714620b
Summary: A library for import of binary StarOffice documents
2476ad7
2476ad7
License: MPLv2.0 or LGPLv2+
2476ad7
URL: https://github.com/fosnola/libstaroffice/wiki
2476ad7
Source: https://github.com/fosnola/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
2476ad7
2476ad7
BuildRequires: doxygen
2476ad7
BuildRequires: help2man
2476ad7
BuildRequires: pkgconfig(librevenge-0.0)
2476ad7
BuildRequires: pkgconfig(zlib)
2476ad7
2476ad7
%description
714620b
%{name} is a library for import of binary StarOffice documents.
2476ad7
2476ad7
%package devel
2476ad7
Summary: Development files for %{name}
2476ad7
Requires: %{name}%{?_isa} = %{version}-%{release}
2476ad7
2476ad7
%description devel
2476ad7
The %{name}-devel package contains libraries and header files for
2476ad7
developing applications that use %{name}.
2476ad7
2476ad7
%package doc
2476ad7
Summary: Documentation of %{name} API
2476ad7
BuildArch: noarch
2476ad7
2476ad7
%description doc
2476ad7
The %{name}-doc package contains documentation files for %{name}.
2476ad7
2476ad7
%package tools
2476ad7
Summary: Tools to transform StarOffice documents into other formats
2476ad7
Requires: %{name}%{?_isa} = %{version}-%{release}
2476ad7
2476ad7
%description tools
2476ad7
Tools to transform StarOffice documents into other formats. Currently
2476ad7
supported: CSV, HTML, plain text, SVG, raw.
2476ad7
2476ad7
%prep
2476ad7
%setup -q
2476ad7
2476ad7
%build
714620b
%configure --disable-static --disable-werror --disable-silent-rules \
714620b
    --enable-zip --with-sharedptr=c++11
2476ad7
sed -i \
2476ad7
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
2476ad7
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
2476ad7
    libtool
2476ad7
make %{?_smp_mflags}
2476ad7
2476ad7
%install
2476ad7
%make_install
2476ad7
rm -f %{buildroot}/%{_libdir}/*.la
2476ad7
# rhbz#1001245 we install API docs directly from build
2476ad7
rm -rf %{buildroot}/%{_docdir}/%{name}
2476ad7
2476ad7
# generate and install man pages
2476ad7
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
2476ad7
for tool in sd2raw sd2svg sd2text sdc2csv sdw2html; do
3dd2588
    help2man -N -S '%{name} %{version}' -o ${tool}.1 %{buildroot}%{_bindir}/${tool}
2476ad7
done
2476ad7
install -m 0755 -d %{buildroot}/%{_mandir}/man1
2476ad7
install -m 0644 sd2*.1 sd?2*.1 %{buildroot}/%{_mandir}/man1
2476ad7
2476ad7
%post -p /sbin/ldconfig
2476ad7
%postun -p /sbin/ldconfig
2476ad7
2476ad7
%files
2476ad7
%doc CREDITS NEWS README
2476ad7
%license COPYING.LGPL COPYING.MPL
2476ad7
%{_libdir}/%{name}-%{apiversion}.so.*
2476ad7
2476ad7
%files devel
2476ad7
%doc ChangeLog
2476ad7
%{_includedir}/%{name}-%{apiversion}
2476ad7
%{_libdir}/%{name}-%{apiversion}.so
2476ad7
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
2476ad7
2476ad7
%files doc
2476ad7
%license COPYING.LGPL COPYING.MPL
2476ad7
%doc docs/doxygen/html
2476ad7
2476ad7
%files tools
2476ad7
%{_bindir}/sdw2html
2476ad7
%{_bindir}/sd2raw
2476ad7
%{_bindir}/sd2svg
2476ad7
%{_bindir}/sd2text
2476ad7
%{_bindir}/sdc2csv
2476ad7
%{_mandir}/man1/sdw2html.1*
2476ad7
%{_mandir}/man1/sd2raw.1*
2476ad7
%{_mandir}/man1/sd2svg.1*
2476ad7
%{_mandir}/man1/sd2text.1*
2476ad7
%{_mandir}/man1/sdc2csv.1*
2476ad7
2476ad7
%changelog
714620b
* Thu Aug 11 2016 David Tardon <dtardon@redhat.com> - 0.0.2-1
714620b
- new upstream release
714620b
2476ad7
* Thu Feb 11 2016 David Tardon <dtardon@redhat.com> - 0.0.1-1
2476ad7
- initial import