# NOTE:
# Upstream packages some unfree fonts which we cannot redistribute,
# so when upgrading calibre we should download upstream tarball by hand from
-# http://downloads.sourceforge.net/calibre and run generate-tarball.sh script
+# https://download.calibre-ebook.com/ and run generate-tarball.sh script
# included as SourceX.
#
Summary: E-book converter and library management
Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków
Name: calibre
-Version: 2.47.0
+Version: 3.26.1
Release: 1
License: GPL v3+
Group: Applications/Multimedia
Source0: %{name}-%{version}-nofonts.tar.xz
-# Source0-md5: 014738246e7fd31cb328fed3a8c296ff
+# Source0-md5: 09556340ceceed29ae7f71bfbb26b849
Source1: generate-tarball.sh
Source2: %{name}-mount-helper
Patch0: %{name}-prefix.patch
-Patch1: %{name}-no-update.patch
-Patch2: %{name}-env_module.patch
-Patch3: %{name}-locales.patch
-Patch4: shebang-python-fix.patch
-Patch5: desktop-integration.patch
+Patch1: %{name}-env_module.patch
+Patch2: %{name}-locales.patch
+Patch3: shebang-python-fix.patch
+Patch4: desktop-integration.patch
URL: http://www.calibre-ebook.com/
%define baeutifulsoup_ver 3.0.5
%define pil_ver 1.1.6
BuildRequires: ImageMagick-devel >= 6.6.4.7
BuildRequires: Qt5Core-devel
BuildRequires: Qt5DBus-devel
+BuildRequires: Qt5EventDispatcherSupport-devel
+BuildRequires: Qt5FontDatabaseSupport-devel
BuildRequires: Qt5Gui-devel
-BuildRequires: Qt5PlatformSupport-devel
+BuildRequires: Qt5ServiceSupport-devel
+BuildRequires: Qt5ThemeSupport-devel
BuildRequires: Qt5Widgets-devel
BuildRequires: chmlib-devel >= 0.40
BuildRequires: libicu-devel
BuildRequires: python-devel >= 1:2.7.1
BuildRequires: python-dns >= %{dns_ver}
BuildRequires: python-genshi
+BuildRequires: python-html5-parser
BuildRequires: python-lxml >= %{lxml_ver}
BuildRequires: python-mechanize >= %{mechanize_ver}
BuildRequires: python-modules-sqlite
+BuildRequires: python-msgpack
BuildRequires: python-netifaces >= %{netifaces_ver}
BuildRequires: python-psutil >= %{psutil_ver}
+BuildRequires: python-regex
BuildRequires: python-sip-devel
BuildRequires: qt5-build
BuildRequires: qt5-qmake
Requires: python-dateutil >= %{dateutil_ver}
Requires: python-dns >= %{dns_ver}
Requires: python-genshi
+Requires: python-html5-parser
Requires: python-lxml >= %{lxml_ver}
Requires: python-mechanize >= %{mechanize_ver}
Requires: python-modules-sqlite
+Requires: python-msgpack
Requires: python-netifaces >= %{netifaces_ver}
Requires: python-psutil >= %{psutil_ver}
+Requires: python-regex
Suggests: ImageMagick-coder-jpeg
Suggests: ImageMagick-coder-png
### FIXME: libunrar.so is needed for rar-packed files
%prep
%setup -q
%patch0 -p1
-#%patch1 -p1 Patch does not apply, not removed completly since spec update is in progress
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
# 64bit target build fix
%{__sed} -i -e "s!'/usr/lib'!'%{_libdir}'!g" setup/build_environment.py
--no-compile \
--prefix=%{_prefix} \
--root=$RPM_BUILD_ROOT \
- --libdir="%{_libdir}"
+ --libdir=%{_libdir}
cp -p resources/images/library.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}-gui.png
cp -p resources/images/viewer.png $RPM_BUILD_ROOT%{_pixmapsdir}/calibre-viewer.png
%attr(755,root,root) %{_bindir}/markdown-calibre
%attr(755,root,root) %{_bindir}/web2disk
%{_datadir}/%{name}
-%{_datadir}/appdata/calibre-ebook-edit.appdata.xml
-%{_datadir}/appdata/calibre-ebook-viewer.appdata.xml
-%{_datadir}/appdata/calibre-gui.appdata.xml
+%{_datadir}/metainfo/calibre-ebook-edit.appdata.xml
+%{_datadir}/metainfo/calibre-ebook-viewer.appdata.xml
+%{_datadir}/metainfo/calibre-gui.appdata.xml
%{_libdir}/%{name}
%{_desktopdir}/calibre-ebook-edit.desktop
%{_desktopdir}/calibre-ebook-viewer.desktop