2 # TODO: - xdg stuff (put desktops and icons in proper place)
5 # Upstream packages some unfree fonts which we cannot redistribute,
6 # so when upgrading calibre we should download upstream tarball by hand from
7 # http://downloads.sourceforge.net/calibre and run generate-tarball.sh script
10 Summary: E-book converter and library management
11 Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków
16 Group: Applications/Multimedia
17 Source0: %{name}-%{version}-nofonts.tar.xz
18 # Source0-md5: 526c7ee7ab7efc27c1ead17fbb48da68
19 Source1: generate-tarball.sh
20 Source2: %{name}-mount-helper
21 Patch0: %{name}-prefix.patch
22 Patch1: %{name}-manpages.patch
23 Patch2: %{name}-no-update.patch
24 Patch3: %{name}-env_module.patch
25 Patch4: %{name}-locales.patch
26 Patch5: shebang-python-fix.patch
27 URL: http://www.calibre-ebook.com/
28 BuildRequires: ImageMagick-devel >= 6.6.4.7
29 BuildRequires: chmlib-devel
30 BuildRequires: libicu-devel
31 BuildRequires: pkgconfig
32 BuildRequires: podofo-devel
33 BuildRequires: poppler-Qt-devel
34 BuildRequires: python-BeautifulSoup
35 BuildRequires: python-PIL
36 BuildRequires: python-PyQt4-devel
37 BuildRequires: python-cssutils >= 1:0.9.7
38 BuildRequires: python-dateutil
39 BuildRequires: python-devel >= 1:2.7.1
40 BuildRequires: python-lxml
41 BuildRequires: python-mechanize
42 BuildRequires: python-modules-sqlite
43 BuildRequires: python-sip-devel
44 BuildRequires: rpm-pythonprov
45 BuildRequires: rpmbuild(macros) >= 1.586
46 BuildRequires: sed >= 4.0
47 BuildRequires: sqlite3-devel
48 BuildRequires: tar >= 1:1.22
49 BuildRequires: xdg-utils
50 BuildRequires: xz >= 1:4.999.7
51 Requires: ImageMagick-coder-jpeg
52 Requires: ImageMagick-coder-png
53 Requires: python-BeautifulSoup
55 Requires: python-cssutils
56 Requires: python-dateutil
58 Requires: python-mechanize
59 Requires: python-modules-sqlite
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 Calibre is meant to be a complete e-library solution. It includes
64 library management, format conversion, news feeds to ebook conversion
65 as well as e-book reader sync features.
67 Calibre is primarily a ebook cataloging program. It manages your ebook
68 collection for you. It is designed around the concept of the logical
69 book, i.e. a single entry in the database that may correspond to
70 ebooks in several formats. It also supports conversion to and from a
71 dozen different ebook formats.
73 Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML,
74 CBR, CBZ, RTF, TXT, PDF and LRS.
76 %description -l pl.UTF-8
77 Calibre to bardzo dobry i darmowy program do czytania e-książek.
79 Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu
80 formatów do ich postaci. Program obsługuje następujące typy plików:
81 import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML
82 eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza.
84 Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i
85 najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy
86 dołączyli również aplikację, którą użytkownik może wykorzystać jako
87 swój własny serwer darmowych książek.
89 %package -n bash-completion-calibre
90 Summary: bash-completion for calibre
91 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre
92 Group: Applications/Shells
93 Requires: %{name} = %{version}-%{release}
94 Requires: bash-completion
96 %description -n bash-completion-calibre
97 bash-completion for calibre.
99 %description -n bash-completion-calibre -l pl.UTF-8
100 Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre.
112 %{__python} setup.py build
115 rm -rf $RPM_BUILD_ROOT
117 %{__python} setup.py install \
118 --root=$RPM_BUILD_ROOT \
119 --libdir="%{_libdir}"
121 %py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name}
122 %py_comp $RPM_BUILD_ROOT%{_libdir}/%{name}
123 %py_postclean %{_libdir}/%{name}
125 # move manpages and locales to proper place
126 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir}
127 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale
129 # set proper filenames for locales (TODO: switch to patch if possible)
130 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do
131 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
132 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \
133 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
135 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do
136 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
137 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \
138 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo
140 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/qt.qm; do
141 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
142 mv $file $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.$lang.qm
145 %{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall
148 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ltg
150 install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
152 %find_lang %{name} --all-name --with-qm
155 rm -rf $RPM_BUILD_ROOT
157 %files -f %{name}.lang
158 %defattr(644,root,root,755)
159 %doc Changelog.yaml COPYRIGHT README
160 %attr(755,root,root) %{_bindir}/calibre
161 %attr(755,root,root) %{_bindir}/calibre-complete
162 %attr(755,root,root) %{_bindir}/calibre-customize
163 %attr(755,root,root) %{_bindir}/calibre-debug
164 %attr(755,root,root) %{_bindir}/calibre-mount-helper
165 %attr(755,root,root) %{_bindir}/calibre-parallel
166 %attr(755,root,root) %{_bindir}/calibre-server
167 %attr(755,root,root) %{_bindir}/calibre-smtp
168 %attr(755,root,root) %{_bindir}/calibredb
169 %attr(755,root,root) %{_bindir}/ebook-convert
170 %attr(755,root,root) %{_bindir}/ebook-device
171 %attr(755,root,root) %{_bindir}/ebook-meta
172 %attr(755,root,root) %{_bindir}/ebook-viewer
173 %attr(755,root,root) %{_bindir}/epub-fix
174 %attr(755,root,root) %{_bindir}/fetch-ebook-metadata
175 %attr(755,root,root) %{_bindir}/librarything
176 %attr(755,root,root) %{_bindir}/lrf2lrs
177 %attr(755,root,root) %{_bindir}/lrfviewer
178 %attr(755,root,root) %{_bindir}/lrs2lrf
179 %attr(755,root,root) %{_bindir}/markdown-calibre
180 %attr(755,root,root) %{_bindir}/pdfmanipulate
181 %attr(755,root,root) %{_bindir}/web2disk
186 %files -n bash-completion-calibre
187 %defattr(644,root,root,755)
188 %{_sysconfdir}/bash_completion.d/*