]>
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 |
4f509109 | 14 | Version: 0.8.15 |
c34bd22c | 15 | Release: 1 |
6d15f615 | 16 | License: GPL v3+ |
02229893 | 17 | Group: Applications/Multimedia |
23304c7f | 18 | Source0: %{name}-%{version}-nofonts.tar.xz |
4f509109 | 19 | # Source0-md5: 7e40667b1a72c5484827ebba2f206d8c |
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 |
82b553c6 | 54 | Requires: python-BeautifulSoup |
2f356583 | 55 | Requires: python-PIL |
6d15f615 | 56 | Requires: python-cssutils |
2f356583 | 57 | Requires: python-dateutil |
6d15f615 | 58 | Requires: python-lxml |
59 | Requires: python-mechanize | |
60 | Requires: python-modules-sqlite | |
b0073032 | 61 | Suggests: ImageMagick-coder-jpeg |
62 | Suggests: ImageMagick-coder-png | |
63 | Suggests: poppler-progs | |
0e501b81 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
66 | %description | |
02229893 ER |
67 | Calibre is meant to be a complete e-library solution. It includes |
68 | library management, format conversion, news feeds to ebook conversion | |
69 | as well as e-book reader sync features. | |
70 | ||
71 | Calibre is primarily a ebook cataloging program. It manages your ebook | |
72 | collection for you. It is designed around the concept of the logical | |
73 | book, i.e. a single entry in the database that may correspond to | |
74 | ebooks in several formats. It also supports conversion to and from a | |
75 | dozen different ebook formats. | |
76 | ||
77 | Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML, | |
78 | CBR, CBZ, RTF, TXT, PDF and LRS. | |
0e501b81 | 79 | |
cee72504 | 80 | %description -l pl.UTF-8 |
81 | Calibre to bardzo dobry i darmowy program do czytania e-książek. | |
82 | ||
83 | Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu | |
84 | formatów do ich postaci. Program obsługuje następujące typy plików: | |
85 | import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML | |
86 | eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza. | |
87 | ||
88 | Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i | |
89 | najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy | |
90 | dołączyli również aplikację, którą użytkownik może wykorzystać jako | |
91 | swój własny serwer darmowych książek. | |
92 | ||
62c1bf99 | 93 | %package -n bash-completion-calibre |
94 | Summary: bash-completion for calibre | |
95 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre | |
96 | Group: Applications/Shells | |
97 | Requires: %{name} = %{version}-%{release} | |
956f97d9 | 98 | Requires: bash-completion |
62c1bf99 | 99 | |
100 | %description -n bash-completion-calibre | |
101 | bash-completion for calibre. | |
102 | ||
103 | %description -n bash-completion-calibre -l pl.UTF-8 | |
104 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre. | |
105 | ||
0e501b81 | 106 | %prep |
107 | %setup -q -n %{name} | |
108 | %patch0 -p1 | |
7b500ff7 | 109 | %patch1 -p1 |
804e0619 | 110 | %patch2 -p1 |
73a1f5ed | 111 | %patch3 -p1 |
ddb4b081 | 112 | %patch4 -p1 |
f6f5b3d6 | 113 | %patch5 -p1 |
114 | ||
d781633a JP |
115 | # 64bit target build fix |
116 | %{__sed} -i -e "s!'/usr/lib'!'%{_libdir}'!g" setup/build_environment.py | |
117 | ||
933d2d03 | 118 | # upstream decides to store locale files in a single zip file but we prefer separate .mo |
f6f5b3d6 | 119 | mkdir resources/localization/locales |
120 | unzip resources/localization/locales.zip -d resources/localization/locales | |
121 | chmod 755 resources/localization/locales/* | |
933d2d03 | 122 | rm -f resources/localization/locales.zip |
0e501b81 | 123 | |
124 | %build | |
03edf045 JP |
125 | CC=%{__cc} \ |
126 | CXX=%{__cxx} \ | |
127 | OVERRIDE_CFLAGS="%{rpmcflags}" \ | |
128 | OVERRIDE_LDFLAGS="%{rpmldflags}" \ | |
5c163f25 | 129 | %{__python} setup.py build |
0e501b81 | 130 | |
131 | %install | |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
134 | %{__python} setup.py install \ | |
9c8cebf1 | 135 | --root=$RPM_BUILD_ROOT \ |
ab1a9c7b | 136 | --libdir="%{_libdir}" |
0e501b81 | 137 | |
e154a7c1 JP |
138 | %py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name} |
139 | %py_comp $RPM_BUILD_ROOT%{_libdir}/%{name} | |
140 | %py_postclean %{_libdir}/%{name} | |
141 | ||
ddb4b081 | 142 | # move manpages and locales to proper place |
7b500ff7 | 143 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir} |
f6f5b3d6 | 144 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale |
145 | ||
146 | # set proper filenames for locales (TODO: switch to patch if possible) | |
933d2d03 | 147 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*; do |
148 | lang=$(echo $file|%{__sed} 's:.*locale/\(.*\).*:\1:') | |
149 | mkdir $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES | |
150 | mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/*.mo \ | |
151 | $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES | |
152 | done; | |
f6f5b3d6 | 153 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do |
154 | lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') | |
155 | mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \ | |
156 | $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo | |
157 | done; | |
158 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do | |
159 | lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') | |
160 | mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \ | |
161 | $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo | |
162 | done; | |
ddb4b081 | 163 | |
e9035516 | 164 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall |
ddb4b081 | 165 | |
f6f5b3d6 | 166 | # unsupported |
167 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ltg | |
933d2d03 | 168 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/en_AU |
f6f5b3d6 | 169 | |
d383d054 MM |
170 | install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir} |
171 | ||
933d2d03 | 172 | %find_lang %{name} --all-name |
173 | ||
0e501b81 | 174 | %clean |
175 | rm -rf $RPM_BUILD_ROOT | |
176 | ||
933d2d03 | 177 | %files -f %{name}.lang |
0e501b81 | 178 | %defattr(644,root,root,755) |
23304c7f | 179 | %doc Changelog.yaml COPYRIGHT README |
180 | %attr(755,root,root) %{_bindir}/calibre | |
181 | %attr(755,root,root) %{_bindir}/calibre-complete | |
182 | %attr(755,root,root) %{_bindir}/calibre-customize | |
183 | %attr(755,root,root) %{_bindir}/calibre-debug | |
d383d054 | 184 | %attr(755,root,root) %{_bindir}/calibre-mount-helper |
23304c7f | 185 | %attr(755,root,root) %{_bindir}/calibre-parallel |
186 | %attr(755,root,root) %{_bindir}/calibre-server | |
187 | %attr(755,root,root) %{_bindir}/calibre-smtp | |
188 | %attr(755,root,root) %{_bindir}/calibredb | |
189 | %attr(755,root,root) %{_bindir}/ebook-convert | |
190 | %attr(755,root,root) %{_bindir}/ebook-device | |
191 | %attr(755,root,root) %{_bindir}/ebook-meta | |
192 | %attr(755,root,root) %{_bindir}/ebook-viewer | |
193 | %attr(755,root,root) %{_bindir}/epub-fix | |
194 | %attr(755,root,root) %{_bindir}/fetch-ebook-metadata | |
23304c7f | 195 | %attr(755,root,root) %{_bindir}/lrf2lrs |
196 | %attr(755,root,root) %{_bindir}/lrfviewer | |
197 | %attr(755,root,root) %{_bindir}/lrs2lrf | |
198 | %attr(755,root,root) %{_bindir}/markdown-calibre | |
199 | %attr(755,root,root) %{_bindir}/pdfmanipulate | |
200 | %attr(755,root,root) %{_bindir}/web2disk | |
0e501b81 | 201 | %{_datadir}/%{name} |
202 | %{_libdir}/%{name} | |
7b500ff7 | 203 | %{_mandir}/man1/*.1* |
62c1bf99 | 204 | |
205 | %files -n bash-completion-calibre | |
206 | %defattr(644,root,root,755) | |
207 | %{_sysconfdir}/bash_completion.d/* |