]> git.pld-linux.org Git - packages/calibre.git/blame - calibre.spec
- require cssutils >= 0.9.9 for conversion
[packages/calibre.git] / calibre.spec
CommitLineData
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 13Summary: E-book converter and library management
cee72504 14Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków
0e501b81 15Name: calibre
3b82e677 16Version: 0.8.53
49834fc9 17Release: 2
6d15f615 18License: GPL v3+
02229893 19Group: Applications/Multimedia
23304c7f 20Source0: %{name}-%{version}-nofonts.tar.xz
3b82e677 21# Source0-md5: 78785f551169af48f7334785cd1c6d2e
3c9d3d2b 22Source1: generate-tarball.sh
5cf7f03b 23Source2: %{name}-mount-helper
0e501b81 24Patch0: %{name}-prefix.patch
3b82e677 25
804e0619 26Patch2: %{name}-no-update.patch
73a1f5ed 27Patch3: %{name}-env_module.patch
f6f5b3d6 28Patch4: %{name}-locales.patch
29Patch5: shebang-python-fix.patch
3b82e677 30Patch6: calibre-0.8.21-poppler.patch
02229893 31URL: http://www.calibre-ebook.com/
3b8cf9a9 32BuildRequires: ImageMagick-devel >= 6.6.4.7
0e501b81 33BuildRequires: chmlib-devel
212c1324 34BuildRequires: libicu-devel
f0879852 35BuildRequires: pkgconfig
0e501b81 36BuildRequires: podofo-devel
64b69419 37BuildRequires: poppler-Qt-devel
bdbd4238 38BuildRequires: python-BeautifulSoup
307ba398 39BuildRequires: python-PIL
0e501b81 40BuildRequires: python-PyQt4-devel
18642ddc 41BuildRequires: python-PyQt4-devel-tools
251db223 42BuildRequires: python-cssutils >= 1:0.9.9
307ba398 43BuildRequires: python-dateutil
72cd9da3 44BuildRequires: python-devel >= 1:2.7.1
0e501b81 45BuildRequires: python-lxml
46BuildRequires: python-mechanize
6d15f615 47BuildRequires: python-modules-sqlite
0e501b81 48BuildRequires: python-sip-devel
49BuildRequires: rpm-pythonprov
23304c7f 50BuildRequires: rpmbuild(macros) >= 1.586
ddb4b081 51BuildRequires: sed >= 4.0
212c1324 52BuildRequires: sqlite3-devel
23304c7f 53BuildRequires: tar >= 1:1.22
f6f5b3d6 54BuildRequires: unzip
3c9d3d2b 55BuildRequires: xdg-utils
23304c7f 56BuildRequires: xz >= 1:4.999.7
82b553c6 57Requires: python-BeautifulSoup
2f356583 58Requires: python-PIL
9a7253c7 59Requires: python-PyQt4
251db223 60Requires: python-cssutils >= 1:0.9.9
2f356583 61Requires: python-dateutil
6d15f615 62Requires: python-lxml
63Requires: python-mechanize
64Requires: python-modules-sqlite
b0073032 65Suggests: ImageMagick-coder-jpeg
66Suggests: ImageMagick-coder-png
400a540b
PG
67### FIXME: libunrar.so is needed for rar-packed files
68Suggests: libunrar-devel
b0073032 69Suggests: poppler-progs
0e501b81 70BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72%description
02229893
ER
73Calibre is meant to be a complete e-library solution. It includes
74library management, format conversion, news feeds to ebook conversion
75as well as e-book reader sync features.
76
77Calibre is primarily a ebook cataloging program. It manages your ebook
78collection for you. It is designed around the concept of the logical
79book, i.e. a single entry in the database that may correspond to
80ebooks in several formats. It also supports conversion to and from a
81dozen different ebook formats.
82
83Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML,
84CBR, CBZ, RTF, TXT, PDF and LRS.
0e501b81 85
cee72504 86%description -l pl.UTF-8
87Calibre to bardzo dobry i darmowy program do czytania e-książek.
88
89Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu
90formatów do ich postaci. Program obsługuje następujące typy plików:
91import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML
92eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza.
93
94Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i
95najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy
96dołączyli również aplikację, którą użytkownik może wykorzystać jako
97swój własny serwer darmowych książek.
98
62c1bf99 99%package -n bash-completion-calibre
100Summary: bash-completion for calibre
101Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre
102Group: Applications/Shells
103Requires: %{name} = %{version}-%{release}
956f97d9 104Requires: bash-completion
62c1bf99 105
106%description -n bash-completion-calibre
107bash-completion for calibre.
108
109%description -n bash-completion-calibre -l pl.UTF-8
110Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre.
111
0e501b81 112%prep
113%setup -q -n %{name}
114%patch0 -p1
3b82e677 115
804e0619 116%patch2 -p1
73a1f5ed 117%patch3 -p1
ddb4b081 118%patch4 -p1
f6f5b3d6 119%patch5 -p1
3b82e677 120%patch6 -p1
f6f5b3d6 121
d781633a
JP
122# 64bit target build fix
123%{__sed} -i -e "s!'/usr/lib'!'%{_libdir}'!g" setup/build_environment.py
124
933d2d03 125# upstream decides to store locale files in a single zip file but we prefer separate .mo
f6f5b3d6 126mkdir resources/localization/locales
127unzip resources/localization/locales.zip -d resources/localization/locales
128chmod 755 resources/localization/locales/*
933d2d03 129rm -f resources/localization/locales.zip
0e501b81 130
131%build
5877892a 132CC="%{__cc}" \
03edf045
JP
133CXX=%{__cxx} \
134OVERRIDE_CFLAGS="%{rpmcflags}" \
135OVERRIDE_LDFLAGS="%{rpmldflags}" \
5c163f25 136%{__python} setup.py build
0e501b81 137
138%install
139rm -rf $RPM_BUILD_ROOT
140
141%{__python} setup.py install \
9c8cebf1 142 --root=$RPM_BUILD_ROOT \
ab1a9c7b 143 --libdir="%{_libdir}"
0e501b81 144
e154a7c1
JP
145%py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name}
146%py_comp $RPM_BUILD_ROOT%{_libdir}/%{name}
147%py_postclean %{_libdir}/%{name}
148
f6f5b3d6 149mv $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 152for 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
157done;
f6f5b3d6 158for 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
162done;
163for 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
167done;
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
175install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
176
933d2d03 177%find_lang %{name} --all-name
178
0e501b81 179%clean
180rm -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}
62c1bf99 208
209%files -n bash-completion-calibre
210%defattr(644,root,root,755)
211%{_sysconfdir}/bash_completion.d/*
This page took 0.121137 seconds and 4 git commands to generate.