b5c349
%global apiversion 0.2
0a5b0f
0a5b0f
Name: libmwaw
b5c349
Version: 0.2.0
b5c349
Release: 4%{?dist}
b5c349
Summary: An import library for many old mac document formats
0a5b0f
0a5b0f
Group: System Environment/Libraries
b5c349
License: LGPLv2+ or MPLv2.0
0a5b0f
URL: http://sourceforge.net/projects/libmwaw/
0a5b0f
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
0a5b0f
0a5b0f
BuildRequires: boost-devel
0a5b0f
BuildRequires: doxygen
b5c349
BuildRequires: help2man
b5c349
BuildRequires: pkgconfig(libwpd-0.9)
b5c349
BuildRequires: pkgconfig(libwpg-0.2)
b5c349
b5c349
Patch0: 0001-std-isfinite-is-C-11.patch
b5c349
Patch1: 0002-use-correct-type.patch
b5c349
Patch2: 0003-Correct-some-cppcheck-errors-change-code-to-avoid-ca.patch
b5c349
Patch3: 0004-avoid-leak.patch
b5c349
Patch4: 0005-ClarisWorks-parser-try-to-reconstruct-compressed-bit.patch
b5c349
Patch5: 0006-ClarisWorks-parser-use-the-page-size-to-define-the-b.patch
b5c349
Patch6: 0007-MacWrite-MacWrite-II-parser-try-to-accept-more-files.patch
b5c349
Patch7: 0008-Correct-a-potential-out-of-bounds-problem.patch
0a5b0f
0a5b0f
%description
b5c349
libmwaw contains import filters for many old mac documents, mostly text
b5c349
formats like ClarisWorks, MacWrite or MS Word for Mac, but it has a
b5c349
limited support for vector drawings and spreadsheets as well (limited in
b5c349
the sense that it treats them as text documents). Full list of supported
b5c349
formats is available at https://sourceforge.net/p/libmwaw/wiki/Home/ .
0a5b0f
0a5b0f
%package devel
0a5b0f
Summary: Development files for %{name}
0a5b0f
Group: Development/Libraries
0a5b0f
Requires: %{name}%{?_isa} = %{version}-%{release}
0a5b0f
0a5b0f
%description devel
0a5b0f
The %{name}-devel package contains libraries and header files for
0a5b0f
developing applications that use %{name}.
0a5b0f
0a5b0f
%package doc
0a5b0f
Summary: Documentation of %{name} API
0a5b0f
Group: Documentation
0a5b0f
BuildArch: noarch
0a5b0f
0a5b0f
%description doc
0a5b0f
The %{name}-doc package contains documentation files for %{name}.
0a5b0f
0a5b0f
%package tools
0a5b0f
Summary: Tools to transform the supported formats into other formats
0a5b0f
Group: Applications/Publishing
0a5b0f
Requires: %{name}%{?_isa} = %{version}-%{release}
0a5b0f
0a5b0f
%description tools
0a5b0f
Tools to transform the supported document formats into other formats.
b5c349
Supported output formats are CSV, XHTML, text and raw.
0a5b0f
0a5b0f
%prep
b5c349
%autosetup -p1
0a5b0f
0a5b0f
%build
0a5b0f
%configure --disable-static --disable-werror --disable-zip --enable-docs
0a5b0f
sed -i \
0a5b0f
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
0a5b0f
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
0a5b0f
    libtool
0a5b0f
make %{?_smp_mflags} V=1
0a5b0f
b5c349
export LD_LIBRARY_PATH=`pwd`/src/lib/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
b5c349
help2man -N -n 'convert Mac spreadsheet into CSV' -o mwaw2csv.1 ./src/conv/csv/.libs/mwaw2csv
b5c349
help2man -N -n 'debug the conversion library' -o mwaw2raw.1 ./src/conv/raw/.libs/mwaw2raw
b5c349
help2man -N -n 'convert Mac text document into HTML' -o mwaw2html.1 ./src/conv/html/.libs/mwaw2html
b5c349
help2man -N -n 'convert Mac text document into plain text' -o mwaw2text.1 ./src/conv/text/.libs/mwaw2text
0a5b0f
0a5b0f
%install
0a5b0f
make install DESTDIR=%{buildroot}
0a5b0f
rm -f %{buildroot}/%{_libdir}/*.la
0a5b0f
# it seems this tool is only useful on MacOS
0a5b0f
rm -f %{buildroot}/%{_bindir}/mwawFile
0a5b0f
# rhbz#1001297 we install API docs directly from build
0a5b0f
rm -rf %{buildroot}/%{_docdir}/%{name}
0a5b0f
b5c349
install -m 0755 -d %{buildroot}/%{_mandir}/man1
b5c349
install -m 0644 mwaw2*.1 %{buildroot}/%{_mandir}/man1
0a5b0f
0a5b0f
%post -p /sbin/ldconfig
0a5b0f
%postun -p /sbin/ldconfig
0a5b0f
0a5b0f
%files
0a5b0f
%doc CHANGES COPYING.* README
0a5b0f
%{_libdir}/%{name}-%{apiversion}.so.*
0a5b0f
0a5b0f
%files devel
b5c349
%doc HACKING
0a5b0f
%{_includedir}/%{name}-%{apiversion}
0a5b0f
%{_libdir}/%{name}-%{apiversion}.so
0a5b0f
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
0a5b0f
0a5b0f
%files doc
0a5b0f
%doc COPYING.*
0a5b0f
%doc docs/doxygen/html
0a5b0f
0a5b0f
%files tools
b5c349
%{_bindir}/mwaw2csv
0a5b0f
%{_bindir}/mwaw2html
0a5b0f
%{_bindir}/mwaw2raw
0a5b0f
%{_bindir}/mwaw2text
b5c349
%{_mandir}/man1/mwaw2csv.1*
b5c349
%{_mandir}/man1/mwaw2html.1*
b5c349
%{_mandir}/man1/mwaw2raw.1*
b5c349
%{_mandir}/man1/mwaw2text.1*
0a5b0f
0a5b0f
%changelog
b5c349
* Fri Aug 22 2014 David Tardon <dtardon@redhat.com> - 0.2.0-4
b5c349
- Resolves: rhbz#1132070 rebase to 0.2.0
b5c349
61ff97
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.1.11-3
61ff97
- Mass rebuild 2014-01-24
61ff97
61ff97
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.1.11-2
61ff97
- Mass rebuild 2013-12-27
61ff97
0a5b0f
* Mon Sep 09 2013 David Tardon <dtardon@redhat.com> - 0.1.11-1
0a5b0f
- new upstream release
0a5b0f
0a5b0f
* Fri Aug 30 2013 David Tardon <dtardon@redhat.com> - 0.1.10-3
0a5b0f
- Resolves: rhbz#1001297 duplicate documentation files / potentially conflicting
0a5b0f
0a5b0f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-2
0a5b0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0a5b0f
0a5b0f
* Thu Jun 27 2013 David Tardon <dtardon@redhat.com> - 0.1.10-1
0a5b0f
- new release
0a5b0f
0a5b0f
* Tue May 14 2013 David Tardon <dtardon@redhat.com> - 0.1.9-1
0a5b0f
- new release
0a5b0f
0a5b0f
* Tue Apr 30 2013 David Tardon <dtardon@redhat.com> - 0.1.8-1
0a5b0f
- new upstream release
0a5b0f
0a5b0f
* Sat Apr 27 2013 David Tardon <dtardon@redhat.com> - 0.1.7-2
0a5b0f
- minor fixes
0a5b0f
0a5b0f
* Tue Mar 19 2013 David Tardon <dtardon@redhat.com> 0.1.7-1
0a5b0f
- initial import