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