1 |
%global major 0 |
2 |
%define libname %mklibname e-book %major |
3 |
%define devname %mklibname -d e-book |
4 |
%global apiversion 0.0 |
5 |
|
6 |
Name: libe-book |
7 |
Version: 0.0.2 |
8 |
Release: %mkrel 2 |
9 |
Summary: A library for import of non-HTML reflowable e-book formats |
10 |
|
11 |
Group: System/Libraries |
12 |
License: LGPLv2+ or MPLv2.0 |
13 |
URL: https://sourceforge.net/projects/libebook/ |
14 |
Source: http://downloads.sourceforge.net/libebook/%{name}-%{version}.tar.xz |
15 |
|
16 |
BuildRequires: boost-devel |
17 |
BuildRequires: cppunit-devel |
18 |
BuildRequires: doxygen |
19 |
BuildRequires: gperf |
20 |
BuildRequires: libicu-devel |
21 |
BuildRequires: libwpd-devel |
22 |
BuildRequires: libxml2-devel |
23 |
BuildRequires: zlib-devel |
24 |
|
25 |
%description |
26 |
%{name} is a library for import of non-HTML reflowable e-book formats. |
27 |
Currently supported are PalmDoc, TealDoc, Plucker eBook, eReader eBook, |
28 |
FictionBook v.2, TCR, zTXT. |
29 |
|
30 |
%package -n %libname |
31 |
Summary: A library for import of non-HTML reflowable e-book formats |
32 |
Group: System/Libraries |
33 |
|
34 |
%description -n %libname |
35 |
%{name} is a library for import of non-HTML reflowable e-book formats. |
36 |
Currently supported are PalmDoc, TealDoc, Plucker eBook, eReader eBook, |
37 |
FictionBook v.2, TCR, zTXT. |
38 |
|
39 |
%package -n %devname |
40 |
Summary: Development files for %{name} |
41 |
Group: Development/C |
42 |
Requires: %{libname} = %{version}-%{release} |
43 |
Provides: libe-book-devel |
44 |
|
45 |
%description -n %devname |
46 |
The %{name}-devel package contains libraries and header files for |
47 |
developing applications that use %{name}. |
48 |
|
49 |
%package doc |
50 |
Summary: Documentation of %{name} API |
51 |
Group: Documentation |
52 |
BuildArch: noarch |
53 |
|
54 |
%description doc |
55 |
The %{name}-doc package contains documentation files for %{name}. |
56 |
|
57 |
%package tools |
58 |
Summary: Tools to transform e-books into other formats |
59 |
Group: Office/Utilities |
60 |
Requires: %{libname} = %{version}-%{release} |
61 |
|
62 |
%description tools |
63 |
Tools to transform e-books into other formats. |
64 |
Currently supported: XHTML, raw, text. |
65 |
|
66 |
%prep |
67 |
%setup -q |
68 |
# TODO: remove with next release |
69 |
sed -i -e s/lebook/le-book/ libe-book.pc.in |
70 |
|
71 |
%build |
72 |
%configure2_5x --disable-silent-rules --disable-static --disable-werror |
73 |
sed -i \ |
74 |
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ |
75 |
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ |
76 |
libtool |
77 |
%make |
78 |
|
79 |
%install |
80 |
%makeinstall_std |
81 |
# TODO: remove with next release |
82 |
install -m 0644 \ |
83 |
inc/libe-book/EBOOKDocument.h inc/libe-book/ZVRDocument.h \ |
84 |
%{buildroot}/%{_includedir}/%{name}-%{apiversion}/%{name} |
85 |
rm -f %{buildroot}/%{_libdir}/*.la |
86 |
# we install API docs directly from build |
87 |
rm -rf %{buildroot}/%{_docdir}/%{name} |
88 |
|
89 |
|
90 |
|
91 |
%check |
92 |
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
93 |
%make check |
94 |
|
95 |
%files -n %libname |
96 |
%doc AUTHORS COPYING.LGPL COPYING.MPL NEWS README |
97 |
%{_libdir}/%{name}-%{apiversion}.so.* |
98 |
|
99 |
%files -n %devname |
100 |
%doc ChangeLog |
101 |
%{_includedir}/%{name}-%{apiversion} |
102 |
%{_libdir}/%{name}-%{apiversion}.so |
103 |
%{_libdir}/pkgconfig/%{name}-%{apiversion}.pc |
104 |
|
105 |
%files doc |
106 |
%doc COPYING.LGPL COPYING.MPL |
107 |
%doc docs/doxygen/html |
108 |
|
109 |
%files tools |
110 |
%{_bindir}/ebook2raw |
111 |
%{_bindir}/ebook2text |
112 |
%{_bindir}/ebook2html |
113 |
|