]>
Commit | Line | Data |
---|---|---|
17e051e1 | 1 | # |
0d2e0555 | 2 | # TODO: - xdg stuff (put desktops and icons in proper place) |
b856ebb4 | 3 | # |
17e051e1 | 4 | # NOTE: |
5 | # Upstream packages some unfree fonts which we cannot redistribute, | |
6 | # so when upgrading calibre we should download upstream tarball by hand from | |
3c9d3d2b | 7 | # http://downloads.sourceforge.net/calibre and run generate-tarball.sh script |
8 | # included as SourceX. | |
17e051e1 | 9 | # |
02229893 | 10 | Summary: E-book converter and library management |
cee72504 | 11 | Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków |
0e501b81 | 12 | Name: calibre |
a70373f0 | 13 | Version: 0.8.3 |
03807163 | 14 | Release: 1 |
6d15f615 | 15 | License: GPL v3+ |
02229893 | 16 | Group: Applications/Multimedia |
23304c7f | 17 | Source0: %{name}-%{version}-nofonts.tar.xz |
a70373f0 | 18 | # Source0-md5: 788eb676a5d74efcb72795156888c2f2 |
3c9d3d2b | 19 | Source1: generate-tarball.sh |
5cf7f03b | 20 | Source2: %{name}-mount-helper |
0e501b81 | 21 | Patch0: %{name}-prefix.patch |
7b500ff7 | 22 | Patch1: %{name}-manpages.patch |
804e0619 | 23 | Patch2: %{name}-no-update.patch |
73a1f5ed | 24 | Patch3: %{name}-env_module.patch |
ddb4b081 | 25 | Patch4: %{name}-locales.patch |
d383d054 | 26 | Patch5: shebang-python-fix.patch |
02229893 | 27 | URL: http://www.calibre-ebook.com/ |
3b8cf9a9 | 28 | BuildRequires: ImageMagick-devel >= 6.6.4.7 |
0e501b81 | 29 | BuildRequires: chmlib-devel |
212c1324 | 30 | BuildRequires: libicu-devel |
f0879852 | 31 | BuildRequires: pkgconfig |
0e501b81 | 32 | BuildRequires: podofo-devel |
64b69419 | 33 | BuildRequires: poppler-Qt-devel |
bdbd4238 | 34 | BuildRequires: python-BeautifulSoup |
307ba398 | 35 | BuildRequires: python-PIL |
0e501b81 | 36 | BuildRequires: python-PyQt4-devel |
7b88f8fb | 37 | BuildRequires: python-cssutils >= 1:0.9.7 |
307ba398 | 38 | BuildRequires: python-dateutil |
72cd9da3 | 39 | BuildRequires: python-devel >= 1:2.7.1 |
0e501b81 | 40 | BuildRequires: python-lxml |
41 | BuildRequires: python-mechanize | |
6d15f615 | 42 | BuildRequires: python-modules-sqlite |
0e501b81 | 43 | BuildRequires: python-sip-devel |
44 | BuildRequires: rpm-pythonprov | |
23304c7f | 45 | BuildRequires: rpmbuild(macros) >= 1.586 |
ddb4b081 | 46 | BuildRequires: sed >= 4.0 |
212c1324 | 47 | BuildRequires: sqlite3-devel |
23304c7f | 48 | BuildRequires: tar >= 1:1.22 |
3c9d3d2b | 49 | BuildRequires: xdg-utils |
23304c7f | 50 | BuildRequires: xz >= 1:4.999.7 |
e27d2bb7 | 51 | Requires: ImageMagick-coder-jpeg |
0b8a8150 | 52 | Requires: ImageMagick-coder-png |
82b553c6 | 53 | Requires: python-BeautifulSoup |
2f356583 | 54 | Requires: python-PIL |
6d15f615 | 55 | Requires: python-cssutils |
2f356583 | 56 | Requires: python-dateutil |
6d15f615 | 57 | Requires: python-lxml |
58 | Requires: python-mechanize | |
59 | Requires: python-modules-sqlite | |
0e501b81 | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
62 | %description | |
02229893 ER |
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. | |
66 | ||
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. | |
72 | ||
73 | Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML, | |
74 | CBR, CBZ, RTF, TXT, PDF and LRS. | |
0e501b81 | 75 | |
cee72504 | 76 | %description -l pl.UTF-8 |
77 | Calibre to bardzo dobry i darmowy program do czytania e-książek. | |
78 | ||
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. | |
83 | ||
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. | |
88 | ||
62c1bf99 | 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} | |
956f97d9 | 94 | Requires: bash-completion |
62c1bf99 | 95 | |
96 | %description -n bash-completion-calibre | |
97 | bash-completion for calibre. | |
98 | ||
99 | %description -n bash-completion-calibre -l pl.UTF-8 | |
100 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre. | |
101 | ||
0e501b81 | 102 | %prep |
103 | %setup -q -n %{name} | |
104 | %patch0 -p1 | |
7b500ff7 | 105 | %patch1 -p1 |
804e0619 | 106 | %patch2 -p1 |
73a1f5ed | 107 | %patch3 -p1 |
ddb4b081 | 108 | %patch4 -p1 |
d383d054 | 109 | %patch5 -p1 |
0e501b81 | 110 | |
111 | %build | |
5c163f25 | 112 | %{__python} setup.py build |
0e501b81 | 113 | |
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %{__python} setup.py install \ | |
9c8cebf1 | 118 | --root=$RPM_BUILD_ROOT \ |
ab1a9c7b | 119 | --libdir="%{_libdir}" |
0e501b81 | 120 | |
e154a7c1 JP |
121 | %py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name} |
122 | %py_comp $RPM_BUILD_ROOT%{_libdir}/%{name} | |
123 | %py_postclean %{_libdir}/%{name} | |
124 | ||
ddb4b081 | 125 | # move manpages and locales to proper place |
7b500ff7 | 126 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir} |
ddb4b081 | 127 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale |
128 | ||
f927ac4b | 129 | # set proper filenames for locales (TODO: switch to patch if possible) |
ddb4b081 | 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 | |
134 | done; | |
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 | |
139 | done; | |
ebcba4af | 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 | |
143 | done; | |
ddb4b081 | 144 | |
e9035516 | 145 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall |
ddb4b081 | 146 | |
212ab578 | 147 | # unsupported |
148 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ltg | |
149 | ||
d383d054 MM |
150 | install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir} |
151 | ||
4113d6cb | 152 | %find_lang %{name} --all-name --with-qm |
7b500ff7 | 153 | |
0e501b81 | 154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
ddb4b081 | 157 | %files -f %{name}.lang |
0e501b81 | 158 | %defattr(644,root,root,755) |
23304c7f | 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 | |
d383d054 | 164 | %attr(755,root,root) %{_bindir}/calibre-mount-helper |
23304c7f | 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 | |
0e501b81 | 182 | %{_datadir}/%{name} |
183 | %{_libdir}/%{name} | |
7b500ff7 | 184 | %{_mandir}/man1/*.1* |
62c1bf99 | 185 | |
186 | %files -n bash-completion-calibre | |
187 | %defattr(644,root,root,755) | |
188 | %{_sysconfdir}/bash_completion.d/* |