939096f
%global apiversion 0.0
939096f
939096f
Name: libe-book
3944ba9
Version: 0.0.3
d86fc23
Release: 2%{?dist}
939096f
Summary: A library for import of non-HTML reflowable e-book formats
939096f
939096f
Group: System Environment/Libraries
939096f
License: LGPLv2+ or MPLv2.0
939096f
URL: https://sourceforge.net/projects/libebook/
939096f
Source: http://downloads.sourceforge.net/libebook/%{name}-%{version}.tar.xz
939096f
939096f
BuildRequires: boost-devel
939096f
BuildRequires: cppunit-devel
939096f
BuildRequires: doxygen
939096f
BuildRequires: gperf
5303c7c
BuildRequires: help2man
939096f
BuildRequires: libicu-devel
939096f
BuildRequires: libwpd-devel
939096f
BuildRequires: libxml2-devel
939096f
BuildRequires: zlib-devel
939096f
939096f
%description
939096f
%{name} is a library for import of non-HTML reflowable e-book formats.
939096f
Currently supported are PalmDoc, TealDoc, Plucker eBook, eReader eBook,
939096f
FictionBook v.2, TCR, zTXT.
939096f
939096f
%package devel
939096f
Summary: Development files for %{name}
939096f
Group: Development/Libraries
939096f
Requires: %{name}%{?_isa} = %{version}-%{release}
939096f
939096f
%description devel
939096f
The %{name}-devel package contains libraries and header files for
939096f
developing applications that use %{name}.
939096f
939096f
%package doc
939096f
Summary: Documentation of %{name} API
939096f
Group: Documentation
939096f
BuildArch: noarch
939096f
939096f
%description doc
939096f
The %{name}-doc package contains documentation files for %{name}.
939096f
939096f
%package tools
939096f
Summary: Tools to transform e-books into other formats
939096f
Group: Applications/Publishing
939096f
Requires: %{name}%{?_isa} = %{version}-%{release}
939096f
939096f
%description tools
939096f
Tools to transform e-books into other formats.
939096f
Currently supported: XHTML, raw, text.
939096f
939096f
%prep
939096f
%setup -q
939096f
939096f
%build
939096f
%configure --disable-silent-rules --disable-static --disable-werror
939096f
sed -i \
939096f
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
939096f
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
939096f
    libtool
939096f
make %{?_smp_mflags}
939096f
30b4c72
export LD_LIBRARY_PATH=$(pwd)/src/lib/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
30b4c72
help2man -N -n 'convert e-book into HTML' -o ebook2html.1 ./src/conv/html/.libs/ebook2html
30b4c72
help2man -N -n 'convert e-book into plain text' -o ebook2text.1 ./src/conv/text/.libs/ebook2text
30b4c72
help2man -N -n 'debug the conversion library' -o ebook2raw.1 ./src/conv/raw/.libs/ebook2raw
5303c7c
939096f
%install
939096f
make install DESTDIR=%{buildroot}
939096f
rm -f %{buildroot}/%{_libdir}/*.la
939096f
# we install API docs directly from build
939096f
rm -rf %{buildroot}/%{_docdir}/%{name}
939096f
5303c7c
mkdir -p %{buildroot}/%{_mandir}/man1
5303c7c
install -m 0644 ebook2*.1 %{buildroot}/%{_mandir}/man1
5303c7c
939096f
%post -p /sbin/ldconfig
939096f
939096f
%postun -p /sbin/ldconfig
939096f
939096f
%check
939096f
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
939096f
make %{?_smp_mflags} check
939096f
939096f
%files
939096f
%doc AUTHORS COPYING.LGPL COPYING.MPL NEWS README
939096f
%{_libdir}/%{name}-%{apiversion}.so.*
939096f
939096f
%files devel
939096f
%doc ChangeLog
939096f
%{_includedir}/%{name}-%{apiversion}
939096f
%{_libdir}/%{name}-%{apiversion}.so
939096f
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc
939096f
939096f
%files doc
939096f
%doc COPYING.LGPL COPYING.MPL
939096f
%doc docs/doxygen/html
939096f
939096f
%files tools
939096f
%{_bindir}/ebook2raw
939096f
%{_bindir}/ebook2text
939096f
%{_bindir}/ebook2html
5303c7c
%{_mandir}/man1/ebook2html.1*
5303c7c
%{_mandir}/man1/ebook2raw.1*
5303c7c
%{_mandir}/man1/ebook2text.1*
939096f
939096f
%changelog
d86fc23
* Thu Feb 13 2014 David Tardon <dtardon@redhat.com> - 0.0.3-2
d86fc23
- rebuild for new ICU
d86fc23
3944ba9
* Mon Feb 10 2014 David Tardon <dtardon@redhat.com> - 0.0.3-1
3944ba9
- new upstream release 0.0.3
5303c7c
- generate man pages for the conversion tools
3944ba9
63c1bf6
* Sat Nov 16 2013 David Tardon <dtardon@redhat.com> - 0.0.2-1
63c1bf6
- new release
63c1bf6
939096f
* Mon Nov 11 2013 David Tardon <dtardon@redhat.com> - 0.0.1-2
939096f
- install all public headers
939096f
- fix library name in .pc
939096f
939096f
* Sun Nov 10 2013 David Tardon <dtardon@redhat.com> - 0.0.1-1
939096f
- initial import