| |
@@ -6,21 +6,12 @@
|
| |
|
| |
Name: calibre
|
| |
Version: 4.12.0
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: E-book converter and library manager
|
| |
License: GPLv3
|
| |
URL: https://calibre-ebook.com/
|
| |
|
| |
- # SourceURL: curl -L http://code.calibre-ebook.com/dist/src > calibre-%%{version}.tar.xz
|
| |
- # Upstream packages some unfree fonts which we cannot redistribute.
|
| |
- # While we're at it, also delete the liberation fonts which we already have.
|
| |
- #
|
| |
- # Download the upstream tarball and invoke this script while in the tarball's
|
| |
- # directory:
|
| |
- # ./getsources.sh %%{version}
|
| |
-
|
| |
- Source0: calibre-%{version}-nofonts.tar.xz
|
| |
- Source1: getsources.sh
|
| |
+ Source0: https://download.calibre-ebook.com/%{version}/%{name}-%{version}.tar.xz
|
| |
|
| |
# Disable auto update from inside the app
|
| |
Patch1: calibre-no-update.patch
|
| |
@@ -243,84 +234,44 @@
|
| |
# these are provided as separate packages
|
| |
rm -rf %{buildroot}%{_libdir}/calibre/odf
|
| |
|
| |
- # link to system fonts after we have deleted (see Source0) the non-free ones
|
| |
- # http://bugs.calibre-ebook.com/ticket/3832
|
| |
- %if 0%{?fedora} >= 31
|
| |
- # In fedora 31 liberation fonts moved directories.
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-BoldItalic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-BoldItalic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-Bold.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Bold.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-Italic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Italic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-Regular.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Regular.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-BoldItalic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-BoldItalic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-Bold.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Bold.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-Italic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Italic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-Regular.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Regular.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-BoldItalic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-BoldItalic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-Bold.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Bold.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-Italic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Italic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-Regular.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Regular.ttf
|
| |
- %else
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationMono-BoldItalic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-BoldItalic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationMono-Bold.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Bold.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationMono-Italic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Italic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationMono-Regular.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Regular.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSans-BoldItalic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-BoldItalic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSans-Bold.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Bold.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSans-Italic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Italic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSans-Regular.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Regular.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSerif-BoldItalic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-BoldItalic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSerif-Bold.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Bold.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSerif-Italic.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Italic.ttf
|
| |
- ln -s --relative \
|
| |
- %{buildroot}%{_datadir}/fonts/liberation/LiberationSerif-Regular.ttf \
|
| |
- %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Regular.ttf
|
| |
- %endif
|
| |
+ # unbundle Liberation fonts
|
| |
+ rm -f %{buildroot}%{_datadir}/calibre/fonts/liberation/*
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-BoldItalic.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-BoldItalic.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-Bold.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Bold.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-Italic.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Italic.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-mono/LiberationMono-Regular.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationMono-Regular.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-BoldItalic.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-BoldItalic.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-Bold.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Bold.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-Italic.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Italic.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-sans/LiberationSans-Regular.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSans-Regular.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-BoldItalic.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-BoldItalic.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-Bold.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Bold.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-Italic.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Italic.ttf
|
| |
+ ln --symbolic --relative \
|
| |
+ %{buildroot}%{_datadir}/fonts/liberation-serif/LiberationSerif-Regular.ttf \
|
| |
+ %{buildroot}%{_datadir}/calibre/fonts/liberation/LiberationSerif-Regular.ttf
|
| |
|
| |
# Remove these 2 appdata files, we can only include one
|
| |
rm -f %{buildroot}/%{_datadir}/metainfo/calibre-ebook-edit.appdata.xml
|
| |
@@ -331,20 +282,14 @@
|
| |
mv %{buildroot}%{_datadir}/calibre/mathjax %{buildroot}%{_datadir}/calibre/mathjax-fedora
|
| |
|
| |
%check
|
| |
- # skip some tests which are failing because of missing dependencies (unrar),
|
| |
- # problems in mock (bonjour), or they require removed fonts
|
| |
- # skip qt test on 32 bit arches for now as there's a pdf issue
|
| |
+ # skip failing tests:
|
| |
+ # - unrar (missing dependencies)
|
| |
+ # - bonjour (problems in mock)
|
| |
+ # - qt (fails on 32-bit architectures only)
|
| |
CALIBRE_PY3_PORT=1 \
|
| |
%{__python3} setup.py test \
|
| |
--exclude-test-name unrar \
|
| |
--exclude-test-name bonjour \
|
| |
- --exclude-test-name actual_case \
|
| |
- --exclude-test-name clone \
|
| |
- --exclude-test-name file_add \
|
| |
- --exclude-test-name file_removal \
|
| |
- --exclude-test-name file_rename \
|
| |
- --exclude-test-name folder_type_map_case \
|
| |
- --exclude-test-name merge_file \
|
| |
%ifarch i686 armv7hl
|
| |
--exclude-test-name qt
|
| |
%endif
|
| |
@@ -396,6 +341,9 @@
|
| |
%{_datadir}/metainfo/*.appdata.xml
|
| |
|
| |
%changelog
|
| |
+ * Sun Mar 15 2020 Marcus A. Romer <aimylios@gmx.de> - 4.12.0-2
|
| |
+ - Use official instead of custom tarball.
|
| |
+
|
| |
* Fri Mar 06 2020 Kevin Fenzi <kevin@scrye.com> - 4.12.0-1
|
| |
- Update to 4.12.0. Fixes bug 1810856
|
| |
|
| |
Since it was first packaged for Fedora, Calibre relies on a script creating a custom tarball from the offical tarball by removing the included fonts. The motivation for this was that there were some non-free fonts (from Sony) which Fedora could not redistribute. As part of this, the Liberation fonts were removed as well, because there is a dedicated package available for them.
The non-free fonts have been removed from Calibre already more than six years ago:
https://github.com/kovidgoyal/calibre/commit/50beda31ae41eacbecdecc5464eddae134c45ad8
I therefore would like to suggest to directly use the official Calibre tarball instead. This would not only simplify the packaging script and process, it also allows to execute seven more test cases which rely on the Liberation font files to be present in the source folder. The only disadvantage I see is that the Fedora sources will include a copy of the Liberation fonts, but the same is true for other parts of Calibre (like MathJax).
The RPMs and build logs for F32 and Rawhide based on this PR are available in my private Copr repository:
https://copr.fedorainfracloud.org/coprs/aimylios/calibre-python3/build/1305626/
Please note that I have removed support for F30 (and older releases) as part of this PR, because it is nearing its end of life. If anyone has the intention to push another update to F30 (currently has calibre-3.36.0-9) I can easily revert this part of the change.