]>
Commit | Line | Data |
---|---|---|
17e051e1 | 1 | # |
0d2e0555 | 2 | # TODO: - xdg stuff (put desktops and icons in proper place) |
5d93136a | 3 | # - rewrite generate-tarball.sh script to provide locales.zip handling (if needed) |
b856ebb4 | 4 | # |
17e051e1 | 5 | # NOTE: |
6 | # Upstream packages some unfree fonts which we cannot redistribute, | |
7 | # so when upgrading calibre we should download upstream tarball by hand from | |
3c9d3d2b | 8 | # http://downloads.sourceforge.net/calibre and run generate-tarball.sh script |
9 | # included as SourceX. | |
17e051e1 | 10 | # |
02229893 | 11 | Summary: E-book converter and library management |
cee72504 | 12 | Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków |
0e501b81 | 13 | Name: calibre |
b0e4d610 | 14 | Version: 0.8.10 |
96b45332 | 15 | Release: 1 |
6d15f615 | 16 | License: GPL v3+ |
02229893 | 17 | Group: Applications/Multimedia |
23304c7f | 18 | Source0: %{name}-%{version}-nofonts.tar.xz |
b0e4d610 | 19 | # Source0-md5: 7dc60321f7a10bfb79f3da67aa7943b4 |
3c9d3d2b | 20 | Source1: generate-tarball.sh |
5cf7f03b | 21 | Source2: %{name}-mount-helper |
0e501b81 | 22 | Patch0: %{name}-prefix.patch |
7b500ff7 | 23 | Patch1: %{name}-manpages.patch |
804e0619 | 24 | Patch2: %{name}-no-update.patch |
73a1f5ed | 25 | Patch3: %{name}-env_module.patch |
f6f5b3d6 | 26 | Patch4: %{name}-locales.patch |
27 | Patch5: shebang-python-fix.patch | |
02229893 | 28 | URL: http://www.calibre-ebook.com/ |
3b8cf9a9 | 29 | BuildRequires: ImageMagick-devel >= 6.6.4.7 |
0e501b81 | 30 | BuildRequires: chmlib-devel |
212c1324 | 31 | BuildRequires: libicu-devel |
f0879852 | 32 | BuildRequires: pkgconfig |
0e501b81 | 33 | BuildRequires: podofo-devel |
64b69419 | 34 | BuildRequires: poppler-Qt-devel |
bdbd4238 | 35 | BuildRequires: python-BeautifulSoup |
307ba398 | 36 | BuildRequires: python-PIL |
0e501b81 | 37 | BuildRequires: python-PyQt4-devel |
18642ddc | 38 | BuildRequires: python-PyQt4-devel-tools |
7b88f8fb | 39 | BuildRequires: python-cssutils >= 1:0.9.7 |
307ba398 | 40 | BuildRequires: python-dateutil |
72cd9da3 | 41 | BuildRequires: python-devel >= 1:2.7.1 |
0e501b81 | 42 | BuildRequires: python-lxml |
43 | BuildRequires: python-mechanize | |
6d15f615 | 44 | BuildRequires: python-modules-sqlite |
0e501b81 | 45 | BuildRequires: python-sip-devel |
46 | BuildRequires: rpm-pythonprov | |
23304c7f | 47 | BuildRequires: rpmbuild(macros) >= 1.586 |
ddb4b081 | 48 | BuildRequires: sed >= 4.0 |
212c1324 | 49 | BuildRequires: sqlite3-devel |
23304c7f | 50 | BuildRequires: tar >= 1:1.22 |
f6f5b3d6 | 51 | BuildRequires: unzip |
3c9d3d2b | 52 | BuildRequires: xdg-utils |
23304c7f | 53 | BuildRequires: xz >= 1:4.999.7 |
e27d2bb7 | 54 | Requires: ImageMagick-coder-jpeg |
0b8a8150 | 55 | Requires: ImageMagick-coder-png |
82b553c6 | 56 | Requires: python-BeautifulSoup |
2f356583 | 57 | Requires: python-PIL |
6d15f615 | 58 | Requires: python-cssutils |
2f356583 | 59 | Requires: python-dateutil |
6d15f615 | 60 | Requires: python-lxml |
61 | Requires: python-mechanize | |
62 | Requires: python-modules-sqlite | |
0e501b81 | 63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
65 | %description | |
02229893 ER |
66 | Calibre is meant to be a complete e-library solution. It includes |
67 | library management, format conversion, news feeds to ebook conversion | |
68 | as well as e-book reader sync features. | |
69 | ||
70 | Calibre is primarily a ebook cataloging program. It manages your ebook | |
71 | collection for you. It is designed around the concept of the logical | |
72 | book, i.e. a single entry in the database that may correspond to | |
73 | ebooks in several formats. It also supports conversion to and from a | |
74 | dozen different ebook formats. | |
75 | ||
76 | Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML, | |
77 | CBR, CBZ, RTF, TXT, PDF and LRS. | |
0e501b81 | 78 | |
cee72504 | 79 | %description -l pl.UTF-8 |
80 | Calibre to bardzo dobry i darmowy program do czytania e-książek. | |
81 | ||
82 | Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu | |
83 | formatów do ich postaci. Program obsługuje następujące typy plików: | |
84 | import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML | |
85 | eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza. | |
86 | ||
87 | Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i | |
88 | najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy | |
89 | dołączyli również aplikację, którą użytkownik może wykorzystać jako | |
90 | swój własny serwer darmowych książek. | |
91 | ||
62c1bf99 | 92 | %package -n bash-completion-calibre |
93 | Summary: bash-completion for calibre | |
94 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre | |
95 | Group: Applications/Shells | |
96 | Requires: %{name} = %{version}-%{release} | |
956f97d9 | 97 | Requires: bash-completion |
62c1bf99 | 98 | |
99 | %description -n bash-completion-calibre | |
100 | bash-completion for calibre. | |
101 | ||
102 | %description -n bash-completion-calibre -l pl.UTF-8 | |
103 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre. | |
104 | ||
0e501b81 | 105 | %prep |
106 | %setup -q -n %{name} | |
107 | %patch0 -p1 | |
7b500ff7 | 108 | %patch1 -p1 |
804e0619 | 109 | %patch2 -p1 |
73a1f5ed | 110 | %patch3 -p1 |
ddb4b081 | 111 | %patch4 -p1 |
f6f5b3d6 | 112 | %patch5 -p1 |
113 | ||
933d2d03 | 114 | # upstream decides to store locale files in a single zip file but we prefer separate .mo |
f6f5b3d6 | 115 | mkdir resources/localization/locales |
116 | unzip resources/localization/locales.zip -d resources/localization/locales | |
117 | chmod 755 resources/localization/locales/* | |
933d2d03 | 118 | rm -f resources/localization/locales.zip |
0e501b81 | 119 | |
120 | %build | |
5c163f25 | 121 | %{__python} setup.py build |
0e501b81 | 122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %{__python} setup.py install \ | |
9c8cebf1 | 127 | --root=$RPM_BUILD_ROOT \ |
ab1a9c7b | 128 | --libdir="%{_libdir}" |
0e501b81 | 129 | |
e154a7c1 JP |
130 | %py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name} |
131 | %py_comp $RPM_BUILD_ROOT%{_libdir}/%{name} | |
132 | %py_postclean %{_libdir}/%{name} | |
133 | ||
ddb4b081 | 134 | # move manpages and locales to proper place |
7b500ff7 | 135 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir} |
f6f5b3d6 | 136 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale |
137 | ||
138 | # set proper filenames for locales (TODO: switch to patch if possible) | |
933d2d03 | 139 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*; do |
140 | lang=$(echo $file|%{__sed} 's:.*locale/\(.*\).*:\1:') | |
141 | mkdir $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES | |
142 | mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/*.mo \ | |
143 | $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES | |
144 | done; | |
f6f5b3d6 | 145 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do |
146 | lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') | |
147 | mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \ | |
148 | $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo | |
149 | done; | |
150 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do | |
151 | lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') | |
152 | mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \ | |
153 | $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo | |
154 | done; | |
ddb4b081 | 155 | |
e9035516 | 156 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall |
ddb4b081 | 157 | |
f6f5b3d6 | 158 | # unsupported |
159 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ltg | |
933d2d03 | 160 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/en_AU |
f6f5b3d6 | 161 | |
d383d054 MM |
162 | install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir} |
163 | ||
933d2d03 | 164 | %find_lang %{name} --all-name |
165 | ||
0e501b81 | 166 | %clean |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
933d2d03 | 169 | %files -f %{name}.lang |
0e501b81 | 170 | %defattr(644,root,root,755) |
23304c7f | 171 | %doc Changelog.yaml COPYRIGHT README |
172 | %attr(755,root,root) %{_bindir}/calibre | |
173 | %attr(755,root,root) %{_bindir}/calibre-complete | |
174 | %attr(755,root,root) %{_bindir}/calibre-customize | |
175 | %attr(755,root,root) %{_bindir}/calibre-debug | |
d383d054 | 176 | %attr(755,root,root) %{_bindir}/calibre-mount-helper |
23304c7f | 177 | %attr(755,root,root) %{_bindir}/calibre-parallel |
178 | %attr(755,root,root) %{_bindir}/calibre-server | |
179 | %attr(755,root,root) %{_bindir}/calibre-smtp | |
180 | %attr(755,root,root) %{_bindir}/calibredb | |
181 | %attr(755,root,root) %{_bindir}/ebook-convert | |
182 | %attr(755,root,root) %{_bindir}/ebook-device | |
183 | %attr(755,root,root) %{_bindir}/ebook-meta | |
184 | %attr(755,root,root) %{_bindir}/ebook-viewer | |
185 | %attr(755,root,root) %{_bindir}/epub-fix | |
186 | %attr(755,root,root) %{_bindir}/fetch-ebook-metadata | |
23304c7f | 187 | %attr(755,root,root) %{_bindir}/lrf2lrs |
188 | %attr(755,root,root) %{_bindir}/lrfviewer | |
189 | %attr(755,root,root) %{_bindir}/lrs2lrf | |
190 | %attr(755,root,root) %{_bindir}/markdown-calibre | |
191 | %attr(755,root,root) %{_bindir}/pdfmanipulate | |
192 | %attr(755,root,root) %{_bindir}/web2disk | |
0e501b81 | 193 | %{_datadir}/%{name} |
194 | %{_libdir}/%{name} | |
7b500ff7 | 195 | %{_mandir}/man1/*.1* |
62c1bf99 | 196 | |
197 | %files -n bash-completion-calibre | |
198 | %defattr(644,root,root,755) | |
199 | %{_sysconfdir}/bash_completion.d/* |