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