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