]> git.pld-linux.org Git - packages/calibre.git/blame - calibre.spec
Up to 1.4.0
[packages/calibre.git] / calibre.spec
CommitLineData
17e051e1 1#
81537047 2# TODO: - rewrite generate-tarball.sh script to provide locales.zip handling (if needed)
4279cd82 3# - make separate server package with init-scripts, etc...
70031606 4# - -locales.patch needs love
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 12Summary: E-book converter and library management
cee72504 13Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków
0e501b81 14Name: calibre
2eeb7ef1 15Version: 1.4.0
cdcddff9 16Release: 1
6d15f615 17License: GPL v3+
02229893 18Group: Applications/Multimedia
23304c7f 19Source0: %{name}-%{version}-nofonts.tar.xz
2eeb7ef1 20# Source0-md5: e92582cc59205102f554b9a5a044e796
3c9d3d2b 21Source1: generate-tarball.sh
5cf7f03b 22Source2: %{name}-mount-helper
0e501b81 23Patch0: %{name}-prefix.patch
152a1c03
JR
24Patch1: %{name}-no-update.patch
25Patch2: %{name}-env_module.patch
26Patch3: %{name}-locales.patch
27Patch4: shebang-python-fix.patch
cdcddff9
JR
28Patch5: imagemagick-6.8.patch
29Patch6: qt4-private.patch
02229893 30URL: http://www.calibre-ebook.com/
3b8cf9a9 31BuildRequires: ImageMagick-devel >= 6.6.4.7
a6ec5715
JP
32BuildRequires: QtCore-devel
33BuildRequires: QtDBus-devel
591b7d3d
MB
34BuildRequires: QtGui-devel
35BuildRequires: QtSvg-devel
36BuildRequires: chmlib-devel >= 0.40
212c1324 37BuildRequires: libicu-devel
591b7d3d
MB
38BuildRequires: libmtp-devel >= 1.1.5
39BuildRequires: libwmf-devel >= 0.2.8
f0879852 40BuildRequires: pkgconfig
591b7d3d
MB
41BuildRequires: podofo-devel >= 0.8.2
42BuildRequires: poppler-Qt-devel >= 0.20.2
43BuildRequires: poppler-glib-devel >= 0.20.2
bdbd4238 44BuildRequires: python-BeautifulSoup
307ba398 45BuildRequires: python-PIL
0e501b81 46BuildRequires: python-PyQt4-devel
18642ddc 47BuildRequires: python-PyQt4-devel-tools
251db223 48BuildRequires: python-cssutils >= 1:0.9.9
307ba398 49BuildRequires: python-dateutil
72cd9da3 50BuildRequires: python-devel >= 1:2.7.1
0e501b81 51BuildRequires: python-lxml
52BuildRequires: python-mechanize
6d15f615 53BuildRequires: python-modules-sqlite
0e501b81 54BuildRequires: python-sip-devel
6b37bdf6 55BuildRequires: qt4-devel-private
0e501b81 56BuildRequires: rpm-pythonprov
23304c7f 57BuildRequires: rpmbuild(macros) >= 1.586
ddb4b081 58BuildRequires: sed >= 4.0
212c1324 59BuildRequires: sqlite3-devel
23304c7f 60BuildRequires: tar >= 1:1.22
f6f5b3d6 61BuildRequires: unzip
3c9d3d2b 62BuildRequires: xdg-utils
23304c7f 63BuildRequires: xz >= 1:4.999.7
591b7d3d
MB
64Requires: python-BeautifulSoup >= 3.0.5
65Requires: python-PIL >= 1.1.6
66Requires: python-PyQt4 >= 4.9.1
bd9bec16 67Requires: python-apsw >= 3.8.0.1
591b7d3d 68Requires: python-cssselect >= 0.7.1
251db223 69Requires: python-cssutils >= 1:0.9.9
591b7d3d
MB
70Requires: python-dateutil >= 1.4.1
71Requires: python-dns >= 1.6.0
72Requires: python-genshi
73Requires: python-lxml >= 2.2.1
74Requires: python-mechanize >= 0.1.11
6d15f615 75Requires: python-modules-sqlite
591b7d3d
MB
76Requires: python-netifaces >= 0.8
77Requires: python-psutil >= 0.6.1
b0073032 78Suggests: ImageMagick-coder-jpeg
79Suggests: ImageMagick-coder-png
400a540b
PG
80### FIXME: libunrar.so is needed for rar-packed files
81Suggests: libunrar-devel
b0073032 82Suggests: poppler-progs
0e501b81 83BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84
85%description
02229893
ER
86Calibre is meant to be a complete e-library solution. It includes
87library management, format conversion, news feeds to ebook conversion
88as well as e-book reader sync features.
89
90Calibre is primarily a ebook cataloging program. It manages your ebook
91collection for you. It is designed around the concept of the logical
92book, i.e. a single entry in the database that may correspond to
93ebooks in several formats. It also supports conversion to and from a
94dozen different ebook formats.
95
96Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML,
97CBR, CBZ, RTF, TXT, PDF and LRS.
0e501b81 98
cee72504 99%description -l pl.UTF-8
100Calibre to bardzo dobry i darmowy program do czytania e-książek.
101
102Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu
103formatów do ich postaci. Program obsługuje następujące typy plików:
104import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML
105eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza.
106
107Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i
108najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy
109dołączyli również aplikację, którą użytkownik może wykorzystać jako
110swój własny serwer darmowych książek.
111
2eeb7ef1
AF
112%package -n bash-completion-calibre
113Summary: bash-completion for calibre
114Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre
115Group: Applications/Shells
116Requires: %{name} = %{version}-%{release}
117Requires: bash-completion
118
119%description -n bash-completion-calibre
120bash-completion for calibre.
121
122%description -n bash-completion-calibre -l pl.UTF-8
123Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre.
124
0e501b81 125%prep
126%setup -q -n %{name}
127%patch0 -p1
152a1c03 128%patch1 -p1
804e0619 129%patch2 -p1
73a1f5ed 130%patch3 -p1
ddb4b081 131%patch4 -p1
cdcddff9
JR
132%patch5 -p1
133%patch6 -p1
f6f5b3d6 134
d781633a
JP
135# 64bit target build fix
136%{__sed} -i -e "s!'/usr/lib'!'%{_libdir}'!g" setup/build_environment.py
137
933d2d03 138# upstream decides to store locale files in a single zip file but we prefer separate .mo
f6f5b3d6 139mkdir resources/localization/locales
140unzip resources/localization/locales.zip -d resources/localization/locales
141chmod 755 resources/localization/locales/*
933d2d03 142rm -f resources/localization/locales.zip
0e501b81 143
144%build
5877892a 145CC="%{__cc}" \
03edf045 146CXX=%{__cxx} \
cdcddff9 147OVERRIDE_CFLAGS="%{rpmcflags}" \
03edf045 148OVERRIDE_LDFLAGS="%{rpmldflags}" \
5c163f25 149%{__python} setup.py build
0e501b81 150
151%install
152rm -rf $RPM_BUILD_ROOT
3550e999 153# create directories for xdg-utils
81537047
JR
154install -d $RPM_BUILD_ROOT%{_datadir}/{icons/hicolor,packages,mime/packages,desktop-directories} \
155 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
0e501b81 156
3550e999
JR
157XDG_DATA_DIRS="$RPM_BUILD_ROOT%{_datadir}" \
158XDG_UTILS_INSTALL_MODE="system" \
159LIBPATH="%{_libdir}" \
0e501b81 160%{__python} setup.py install \
9c8cebf1 161 --root=$RPM_BUILD_ROOT \
ab1a9c7b 162 --libdir="%{_libdir}"
0e501b81 163
81537047
JR
164cp -p resources/images/library.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}-gui.png
165cp -p resources/images/viewer.png $RPM_BUILD_ROOT%{_pixmapsdir}/calibre-viewer.png
166
e154a7c1
JP
167%py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name}
168%py_comp $RPM_BUILD_ROOT%{_libdir}/%{name}
169%py_postclean %{_libdir}/%{name}
170
81537047 171mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_localedir}
f6f5b3d6 172
173# set proper filenames for locales (TODO: switch to patch if possible)
81537047 174for file in $RPM_BUILD_ROOT%{_localedir}/*; do
933d2d03 175 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\).*:\1:')
81537047
JR
176 mkdir $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES
177 mv $RPM_BUILD_ROOT%{_localedir}/$lang/*.mo \
178 $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES
933d2d03 179done;
81537047 180for file in $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/messages.mo; do
f6f5b3d6 181 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
81537047
JR
182 mv $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/messages.mo \
183 $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/%{name}.mo
f6f5b3d6 184done;
81537047 185for file in $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/iso639.mo; do
f6f5b3d6 186 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
81537047
JR
187 mv $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/iso639.mo \
188 $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/%{name}_iso639.mo
f6f5b3d6 189done;
ddb4b081 190
e9035516 191%{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall
ddb4b081 192
f6f5b3d6 193# unsupported
591b7d3d
MB
194%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ber
195%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/jv
81537047
JR
196%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ltg
197%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/en_AU
f6f5b3d6 198
d383d054
MM
199install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
200
933d2d03 201%find_lang %{name} --all-name
202
0e501b81 203%clean
204rm -rf $RPM_BUILD_ROOT
205
81537047
JR
206%post
207%update_desktop_database
208%update_mime_database
209%update_icon_cache hicolor
210
211%postun
212if [ $1 -eq 0 ] ; then
213 %update_desktop_database
214 %update_mime_database
215 %update_icon_cache hicolor
216fi
217
933d2d03 218%files -f %{name}.lang
0e501b81 219%defattr(644,root,root,755)
cdcddff9 220%doc Changelog.yaml COPYRIGHT README.md
23304c7f 221%attr(755,root,root) %{_bindir}/calibre
222%attr(755,root,root) %{_bindir}/calibre-complete
223%attr(755,root,root) %{_bindir}/calibre-customize
224%attr(755,root,root) %{_bindir}/calibre-debug
d383d054 225%attr(755,root,root) %{_bindir}/calibre-mount-helper
23304c7f 226%attr(755,root,root) %{_bindir}/calibre-parallel
227%attr(755,root,root) %{_bindir}/calibre-server
228%attr(755,root,root) %{_bindir}/calibre-smtp
229%attr(755,root,root) %{_bindir}/calibredb
230%attr(755,root,root) %{_bindir}/ebook-convert
231%attr(755,root,root) %{_bindir}/ebook-device
232%attr(755,root,root) %{_bindir}/ebook-meta
cdcddff9 233%attr(755,root,root) %{_bindir}/ebook-polish
23304c7f 234%attr(755,root,root) %{_bindir}/ebook-viewer
23304c7f 235%attr(755,root,root) %{_bindir}/fetch-ebook-metadata
23304c7f 236%attr(755,root,root) %{_bindir}/lrf2lrs
237%attr(755,root,root) %{_bindir}/lrfviewer
238%attr(755,root,root) %{_bindir}/lrs2lrf
239%attr(755,root,root) %{_bindir}/markdown-calibre
23304c7f 240%attr(755,root,root) %{_bindir}/web2disk
0e501b81 241%{_datadir}/%{name}
242%{_libdir}/%{name}
81537047
JR
243%{_desktopdir}/calibre-ebook-viewer.desktop
244%{_desktopdir}/calibre-gui.desktop
245%{_desktopdir}/calibre-lrfviewer.desktop
591b7d3d 246%{_iconsdir}/hicolor/*/*/*.png
cdcddff9 247%{_datadir}/mime/application/*.xml
fe3c8b7b 248%{_datadir}/mime/text/*.xml
81537047
JR
249%{_datadir}/mime/packages/calibre-mimetypes.xml
250%{_pixmapsdir}/%{name}-gui.png
251%{_pixmapsdir}/calibre-viewer.png
2eeb7ef1
AF
252
253%files -n bash-completion-calibre
254%defattr(644,root,root,755)
255%{_sysconfdir}/bash_completion.d/*
This page took 0.089375 seconds and 4 git commands to generate.