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