af3f41
%global apiversion 0.0
af3f41
af3f41
Name: libzmf
af3f41
Version: 0.0.2
af3f41
Release: 1%{?dist}
af3f41
Summary: A library for import of Zoner document formats
af3f41
af3f41
License: MPLv2.0
af3f41
URL: http://wiki.documentfoundation.org/DLP/Libraries/libzmf
af3f41
Source: http://dev-www.libreoffice.org/src/%{name}/%{name}-%{version}.tar.xz
af3f41
af3f41
BuildRequires: boost-devel
af3f41
BuildRequires: doxygen
af3f41
BuildRequires: help2man
af3f41
BuildRequires: pkgconfig(cppunit)
af3f41
BuildRequires: pkgconfig(icu-uc)
af3f41
BuildRequires: pkgconfig(librevenge-0.0)
af3f41
BuildRequires: pkgconfig(libpng)
af3f41
BuildRequires: pkgconfig(zlib)
af3f41
af3f41
%description
af3f41
libzmf is library providing ability to interpret and import Zoner
af3f41
document formats into various applications. Currently it only supports
af3f41
Zoner Callisto/Draw v 4-5.
af3f41
af3f41
%package devel
af3f41
Summary: Development files for %{name}
af3f41
Requires: %{name}%{?_isa} = %{version}-%{release}
af3f41
af3f41
%description devel
af3f41
The %{name}-devel package contains libraries and header files for
af3f41
developing applications that use %{name}.
af3f41
af3f41
%package doc
af3f41
Summary: Documentation of %{name} API
af3f41
BuildArch: noarch
af3f41
af3f41
%description doc
af3f41
The %{name}-doc package contains documentation files for %{name}.
af3f41
af3f41
%package tools
af3f41
Summary: Tools to transform Zoner documents into other formats
af3f41
Requires: %{name}%{?_isa} = %{version}-%{release}
af3f41
af3f41
%description tools
af3f41
Tools to transform Zoner documents into other formats.
af3f41
Currently supported: SVG, raw.
af3f41
af3f41
%prep
af3f41
%autosetup -p1
af3f41
af3f41
%build
af3f41
%configure --disable-silent-rules --disable-static --disable-werror
af3f41
sed -i \
af3f41
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
af3f41
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
af3f41
    libtool
af3f41
make %{?_smp_mflags}
af3f41
af3f41
%install
af3f41
make install DESTDIR=%{buildroot}
af3f41
rm -f %{buildroot}/%{_libdir}/*.la
af3f41
# we install API docs directly from build
af3f41
rm -rf %{buildroot}/%{_docdir}/%{name}
af3f41
af3f41
# generate and install man pages
af3f41
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
af3f41
for tool in zmf2raw zmf2svg; do
af3f41
    help2man -N -S '%{name} %{version}' -o ${tool}.1 %{buildroot}%{_bindir}/${tool}
af3f41
done
af3f41
install -m 0755 -d %{buildroot}/%{_mandir}/man1
af3f41
install -m 0644 zmf2*.1 %{buildroot}/%{_mandir}/man1
af3f41
af3f41
%post -p /sbin/ldconfig
af3f41
%postun -p /sbin/ldconfig
af3f41
af3f41
%check
af3f41
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
af3f41
make %{?_smp_mflags} check
af3f41
af3f41
%files
af3f41
%doc AUTHORS NEWS
af3f41
%license COPYING
af3f41
%{_libdir}/%{name}-%{apiversion}.so.*
af3f41
af3f41
%files devel
af3f41
%doc ChangeLog
af3f41
%{_includedir}/%{name}-%{apiversion}
af3f41
%{_libdir}/%{name}-%{apiversion}.so
af3f41
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
af3f41
af3f41
%files doc
af3f41
%license COPYING
af3f41
%doc docs/doxygen/html
af3f41
af3f41
%files tools
af3f41
%{_bindir}/zmf2raw
af3f41
%{_bindir}/zmf2svg
af3f41
%{_mandir}/man1/zmf2raw.1*
af3f41
%{_mandir}/man1/zmf2svg.1*
af3f41
af3f41
%changelog
af3f41
* Sun Sep 17 2017 David Tardon <dtardon@redhat.com> - 0.0.2-1
af3f41
- Resolves: rhbz#1477089 import package