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