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