3 # Upstream packages some unfree fonts which we cannot redistribute,
4 # so when upgrading calibre we should download upstream tarball by hand from
5 # http://downloads.sourceforge.net/calibre and run generate-tarball.sh script
8 Summary: E-book converter and library management
13 Group: Applications/Multimedia
14 Source0: %{name}-%{version}-nofonts.tar.bz2
15 # Source0-md5: 7ed89159bbd97db0d2dcf850bb1dd867
16 Source1: generate-tarball.sh
17 Patch0: %{name}-prefix.patch
18 Patch1: %{name}-manpages.patch
19 Patch2: %{name}-no-update.patch
20 Patch3: %{name}-env_module.patch
21 Patch4: %{name}-locales.patch
22 URL: http://www.calibre-ebook.com/
23 BuildRequires: ImageMagick-devel
24 BuildRequires: chmlib-devel
25 BuildRequires: podofo-devel
26 BuildRequires: poppler-Qt-devel
27 BuildRequires: python-BeautifulSoup
28 BuildRequires: python-PIL
29 BuildRequires: python-PyQt4-devel
30 BuildRequires: python-cssutils
31 BuildRequires: python-dateutil
32 BuildRequires: python-lxml
33 BuildRequires: python-mechanize
34 BuildRequires: python-modules-sqlite
35 BuildRequires: python-sip-devel
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(find_lang) >= 1.23
38 BuildRequires: sed >= 4.0
39 BuildRequires: xdg-utils
41 Requires: python-cssutils
42 Requires: python-dateutil
44 Requires: python-mechanize
45 Requires: python-modules-sqlite
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Calibre is meant to be a complete e-library solution. It includes
50 library management, format conversion, news feeds to ebook conversion
51 as well as e-book reader sync features.
53 Calibre is primarily a ebook cataloging program. It manages your ebook
54 collection for you. It is designed around the concept of the logical
55 book, i.e. a single entry in the database that may correspond to
56 ebooks in several formats. It also supports conversion to and from a
57 dozen different ebook formats.
59 Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML,
60 CBR, CBZ, RTF, TXT, PDF and LRS.
71 %{__python} setup.py build
74 rm -rf $RPM_BUILD_ROOT
76 %{__python} setup.py install \
77 --root=$RPM_BUILD_ROOT \
80 # move manpages and locales to proper place
81 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir}
82 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale
84 # set proper filenames for locales (switch to patch if possible)
85 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do
86 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
87 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \
88 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
90 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do
91 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
92 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \
93 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo
97 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/qt.qm
99 %find_lang %{name} --all-name
102 rm -rf $RPM_BUILD_ROOT
104 %files -f %{name}.lang
105 %defattr(644,root,root,755)
106 %doc COPYRIGHT README
107 %attr(755,root,root) %{_bindir}/*