Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package calibre for openSUSE:Leap:16.0 
checked in at 2025-04-23 16:39:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:16.0/calibre (Old)
 and      /work/SRC/openSUSE:Leap:16.0/.calibre.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "calibre"

Wed Apr 23 16:39:19 2025 rev:1 rq:1271149 version:8.3.0

Changes:
--------
New Changes file:

--- /dev/null   2025-04-02 01:05:25.176000000 +0200
+++ /work/SRC/openSUSE:Leap:16.0/.calibre.new.30101/calibre.changes     
2025-04-23 16:39:21.947558744 +0200
@@ -0,0 +1,16581 @@
+-------------------------------------------------------------------
+Fri Apr 18 06:19:16 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Uptate to 8.3.0
+  * New Features
+    - Cover grid: Allow configuring different backgrounds for light
+      and dark mode in Preferences->Look & feel->Cover grid
+    - E-book viewer: Further speedup first open of large EPUB files
+      by another 30%
+    - Metadata review dialog: Add merge comments action
+  * Bug Fixes
+    - Kobo driver: Fix viewing of KEPUB files from the device view
+      in calibre not working
+    - Fix a regression in 8.1 that broke displaying of the debug
+      log when running in debug mode
+    - E-book viewer: Fix a regression in 8.0 that caused the clock
+      to display an extra p after the time
+- Fix build error for Leap 16.0.
+
+-------------------------------------------------------------------
+Fri Apr 11 10:54:10 UTC 2025 - Eric Schirra <ec...@schirra.net>
+
+- Update to 8.2.100
+  No changelog from upstream. But see:
+  https://github.com/kovidgoyal/calibre/compare/v8.2.1...v8.2.100
+
+-------------------------------------------------------------------
+Fri Apr  4 08:47:34 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 8.2.1
+  - Version 8.2.1 fixes an error when clicking on format links in
+    the book details panel
+
+-------------------------------------------------------------------
+Fri Apr  4 05:23:22 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 8.2.0
+  * New Features
+    - Kobo driver: Add support for new Tolino firmware
+    - Kindle driver: Allow using a value of * in
+      Preferences->Output options->MOBI Output to have the driver
+      mark all books sent to the device as personal documents
+  * Bug Fixes
+    - Kobo driver: Fix hyphenation and extra CSS added to KEPUB
+      files being ignored by the renderer on the Kobo
+    - macOS: Fix opening book folder or PDF files for books with
+      square brackets in the title not working
+    - Quickview: Fix a long standing bug with syncing of columns
+      in the presence of hidden/re-ordered columns
+    - E-book viewer: Show an error message when an invalid nearby
+      search expression is used
+    - KEPUB Output: Fix incorrect encoding detection for some HTML
+      files without an encoding declaration
+    - macOS: Fix a regression in the previous release that caused
+      failures in the E-book viewer when updating annotations for
+      books with a large number of annotations
+
+-------------------------------------------------------------------
+Fri Mar 28 08:09:05 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 8.1.1
+  - Version 8.1.1 fixes a regression causing an error that does not
+    affect functionality on startup on macOS
+
+-------------------------------------------------------------------
+Fri Mar 28 05:59:16 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 8.1.0
+  * New features
+    - Edit metadata dialog: Allow right clicking on the cover to
+      edit it with an external program
+    - Virtual library tabs: When the tabs are locked prevent them
+      from being re-ordered as well
+    - FreeBSD: Add support for connecting to devices
+  * Bug fixes
+    - macOS: Fix regression in previous release that caused
+      calibre:// URLs to no longer work
+    - macOS: Fix a regression in calibre 8 that prevented icons in
+      menus from being rendered
+    - Kobo driver: Fix hyphenation settings not being applied
+      correctly when generating KEPUB to put on the device
+    - KEPUB Output: Include leading whitespace in kobo sentence span
+      tags. This prevents unsightly breaks when highlighting across
+      formatted text on the Kobo
+    - Content server: Fix FB2 books not readable via the in-browser
+      viewer
+    - Edit book: Add text narration: Fix preferred voice for
+      language setting being ignored
+    - E-book viewer: Use IPC to update annotations when calibre is
+      running. Avoids possible loss of annotations in the
+      Annotations browser due to db being locked
+    - Ensure calibre temp files are deleted even on program crash
+    - Fix incorrect minimums on font size changing controls in viewer
+    - Fix regression in previous release causing incorrect
+      rendering of layout menu on some macOS machines
+    - Fix archive formats such as ZIP not being indexed for full
+      text search
+
+-------------------------------------------------------------------
+Fri Mar 21 10:15:41 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 8.0.1
+  - Version 8.0.1 fixes a failure to start on systems where the
+    user had previously installed the KoboTouchExtended plugin
+    and disabled the builtin KoboTouch driver
+
+-------------------------------------------------------------------
+Fri Mar 21 06:48:29 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 8.0.0
+  * New Features
+    - Much improved Kobo support
+    - Connect to folder: Allow connecting a specific device
+    - When completing names for fields that contain hierarchical
+      data in prefix mode match prefixes after every period
+    - ToC editor: Allow moving of multiple selected items in the
+      Table of Contents
+    - macOS: The calibre application icons in the dock are now
+      displayed in a white frame to follow Apple's current
+      recommended icon style
+    - Kobo driver: Add support for new firmware on Tolino devices
+    - Book details: Add option in to suppress author search links
+  * Bug Fixes
+    - Fix a regression that broke tabbing to edit cells in the book
+      list when some columns have been hidden or re-ordered
+    - Catalog generation: Allow using templates that access the
+      database for notes
+    - Fix a bug when renaming authors to a name with commas in it
+    - Full text search: Also index text in ZIP and RAR archives as
+      these can be viewed by the calibre viewer
+    - E-book viewer: Fix Table of Contents current entry tracking
+      not working for some books
+    - When reading metadata from HTML also recognize name="subject"
+      meta tags as calibre tags
+    - E-book viewer: Fix viewer not closing on the interrupt signal
+    - Edit book: Download external resources: Fix incorrect
+      filename if the server returns a generic Content-Type header
+    - Metadata download: Publisher/series transform rules:
+      Fix values with commas in them not working
+
+-------------------------------------------------------------------
+Tue Mar 11 12:30:47 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Use pythons instead static python311.
+
+-------------------------------------------------------------------
+Fri Feb 14 05:31:49 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 7.26.0
+  * New Features
+    - Allow specifying web search links that are used when clicking
+      on item names in the Book details panel for custom columns via
+      Preferences->Add your own columns
+    - Content server: When clicking on author names in the book
+      details page perform the same action as clicking it in the
+      calibre program's Book details panel
+  * Bug Fixes
+    - Fix a regression in 7.17 that caused various minor problems
+      with editing metadata directly in the book list
+    - Fix a regression in the previous release that broke conversion
+      using Heuristics and TXT input documents
+    - E-book viewer: Fix header/footer text size too small when using
+      multiple monitors and the primary monitors DPI is much less
+      than secondary monitor DPI
+    - Fix series mapping rules in the metadata preferences not working
+    - Fix setting custom icon for category doesn't work
+    - Kobo driver: Fix a regression that broke working with very
+      old Kobo devices
+
+-------------------------------------------------------------------
+Fri Feb  7 06:37:48 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 7.25.0
+  * New Features
+    - Allow setting custom icons for items in the Tab browser by
+      right clicking on them and choosing "Manage icon for this value"
+    - Kindle driver: Allow import of KFX files from 2024 Kindles
+      that use the MTP protocol
+    - A new tweak in Preferences->Tweaks to control the East Asian
+      language used when transliterating to English
+    - Add an option to adjust the size of the link and note icons
+      in Book details under Preferences->Look & feel->Book details
+  * Bug Fixes
+    - Nook driver: Fix the Glowlight 4 not working on Windows
+    - MTP driver: Fix Internal storage and SD card being swapped on
+      some devices that have buggy firmware that assigns the
+      SD card a lower id than the internal storage
+    - Template dialog: Respect the tweak for title/series when
+      editing save to disk and send to device templates
+    - Content server: Fix icons for individual formats not being
+      shown in the Tag browser
+
+-------------------------------------------------------------------
+Fri Jan 10 15:54:59 UTC 2025 - ecsos <ec...@opensuse.org>
+
+- Update to 7.24.0
+  * New Features
+    - Allow creating rules to transform series names in the Bulk
+      metadata editor and Preferences->Metadata download
+    - Conversion: Automatically set the page progression direction
+      for books that do not have it set and have their primary
+      language either Arabic or Hebrew
+    - Content server: Book details view:
+      Make calibre://show-book and calibre://view-book URLs in the
+      comments work
+    - Edit book: Spell check: Add a button to export the currently
+      displayed list of words as a CSV file
+    - Add from ISBN: Add a checkbox to automatically convert
+      obsolete ISBN 10 to ISBN 13
+    - Save single format to disk: Allow choosing the book cover as
+      the format to save
+    - Option to show a button to access all available actions from
+      the status bar in Preferences->Look & feel->Main interface
+  * Bug Fixes
+    - Read aloud: Fix no audio produced when text contains <3 and
+      using the Windows legacy speech engine
+    - Fix Tabbing while editing cells in the book list not always
+      working
+    - Windows build: Also sign the portable launcher exes
+    - Fix viewing books via the Cover browser not working when in
+      device view
+
+-------------------------------------------------------------------
+Fri Dec 20 08:54:43 UTC 2024 - ecsos <ec...@opensuse.org>
+
+- Update to 7.23.0
+  * New Features
+    - Happy holidays to everyone!
+    -Content server: Allow managing the data files associated with
+      a book by clicking the three dots in the top right corner of
+      the book's page and choosing "Manage data files"
+    - Edit metadata dialog: Allow right clicking on the cover to
+      view it in a popup window at larger size
+    - Add an option to expand the Tag browser tree to show the
+      item that was current when the library was closed
+    - Add import and export stored template to
+      Preferences / template functions
+    - Various Quality-of-Life improvements to the dialog used to
+      edit columns with fixed sets of values
+    - Resolve doi.org links when pasting identifiers
+  * Bug Fixes
+    - Viewer: Fix some HTMLZ files not opening on some systems
+    - Amazon metadata plugin: Update for changed markup for some
+      books on amazon search results page
+
+-------------------------------------------------------------------
+Sat Nov 30 10:25:47 UTC 2024 - ecsos <ec...@opensuse.org>
+
+- Update to 7.22.0
+  * New Features
+    - E-book viewer: Read Aloud: Add an option to control the
+      position of the popup control bar. It can now be placed along
+      the top or bottom edges so as to overlap less with text.
+    - System tray menu: Add action to restart calibre
+    - Tolino driver: Support new firmware
+  * Bug Fixes
+    - Windows: Enable popup OS notifications even when system tray
+      icon is disabled to match behavior on other platforms.
+      Notifications can be disabled via
+      Preferences->Look & feel->Disable notifications on job
+      completion
+    - Fix a regression that caused incorrect English transliteration
+      of Japanese text even when the UI language is set to Japanese
+    - macOS: Dark mode: Fix a regression that caused the scrollbar
+      to no longer be transient
+    - DOCX Input: When some text has multiple footnotes insert a
+      space between the consecutive foot note numbers so that they
+      are distinct
+    - DOCX Input: Fix ToC nesting not working if the styles for the
+      ToC levels dont use integer margins
+    - E-book viewer: Fix spurious chapter transition after
+      configuring Read aloud
+    - PDF Input: Fix reflow of lines in files with little text not
+      working
+
+-------------------------------------------------------------------
+Fri Nov  8 07:30:59 UTC 2024 - ecsos <ec...@opensuse.org>
+
+- Update to 7.21.0
+  * New Features
+    - Edit book: A new tool to create an audio overlay in EPUB
+      files for all text using the Read aloud facility
+    - Dark mode: make scrollbar more visible with higher contrast
+      and rounded corners
+    - E-book viewer: In flow mode when scrolling across internal
+      file boundaries using the mouse wheel/touchpad have a short
+      half second pause to ease the transition. Can be controlled
+      via the Scrolling section of the Viewer preferences.
+    - ebook-meta.exe: Add an option to disallow rendered cover
+      of first page for EPUB
+    - Book details: Add an action to download the cover to the
+      context menu when right clicking the cover
+    - Read aloud: Add a restore defaults button to the
+      configuration dialog
+    - Auto adding: Allow excluding arbitrary file types not just
+      known book file types
+    - Edit metadata dialog: Add an action to open the book's folder
++++ 16284 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:Leap:16.0/.calibre.new.30101/calibre.changes

New:
----
  calibre-8.3.0.tar.xz
  calibre-8.3.0.tar.xz.sig
  calibre-no-update.diff
  calibre-rpmlintrc
  calibre-setup.install.py.diff
  calibre.changes
  calibre.keyring
  calibre.spec
  hyphenation-dictionaries.tar.gz
  iso-codes-main.zip
  mathjax-3.1.4.tar.gz
  user-agent-data.json

BETA DEBUG BEGIN:
  New:  be at least done automatically bnc#993644
  * calibre-no-update.diff
  New:      hyphens/underscores
- Rebase calibre-setup.install.py.diff.
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ calibre.spec ++++++
#
# spec file for package calibre
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define my_qtversion 6.5.3

%if 0%{suse_version} < 1600
%global pythons python311
%else
%global pythons python3
%endif

%{?sle15_python_module_pythons}
Name:           calibre
Version:        8.3.0
Release:        0
Summary:        EBook Management Application
License:        GPL-3.0-only
Group:          Productivity/Other
URL:            https://calibre-ebook.com
Source0:        
https://download.calibre-ebook.com/%{version}/calibre-%{version}.tar.xz
Source1:        
https://calibre-ebook.com/signatures/calibre-%{version}.tar.xz.sig
Source2:        https://calibre-ebook.com/signatures/kovid.gpg#/%{name}.keyring
Source5:        
https://github.com/mathjax/MathJax/archive/3.1.4/mathjax-3.1.4.tar.gz
#Source6-URL:        
https://github.com/LibreOffice/dictionaries/archive/master/hyphenation-dictionaries.tar.gz
# Must be comment out because obs/osc can not download it altought it is valid, 
and obs rise up an error when it enable.
# Source6 is backup if upstream change something again.
Source6:        hyphenation-dictionaries.tar.gz
# Source7-URL: 
https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/main/iso-codes-main.zip
# Must be comment out because obs/osc can not download it altought it is valid, 
and obs rise up an error when it enable.
# Source7 is backup if upstream change something again.
Source7:        iso-codes-main.zip
# Missing user-agent-data.json since 6.12.0.
# Fix: FileNotFoundError: [Errno 2] No such file or directory: 
'/usr/share/calibre/user-agent-data.json'
# Use from inside 
https://github.com/kovidgoyal/calibre/releases/download/v6.14.0/calibre-6.14.0-x86_64.txz
Source8:        user-agent-data.json
Source100:      %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE: install locale files the openSUSE way
Patch2:         %{name}-setup.install.py.diff
# PATCH-FIX-OPENSUSE: disabling Autoupdate Searcher
Patch3:         %{name}-no-update.diff
ExclusiveArch:  aarch64 x86_64 riscv64
%if 0%{?suse_version} <= 1550
BuildRequires:  gcc12
BuildRequires:  gcc12-c++
%else
BuildRequires:  gcc
BuildRequires:  gcc-c++
%endif
BuildRequires:  cmake >= 3.27.6
BuildRequires:  fdupes
BuildRequires:  help2man
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files

# A note on BuildRequires and Requires:
#
# Requires should always be a subset of BuildRequires. If there are packages
# that are only Required
# * there is no way to check whether these packages are available in the given
#   repositories unless you install the package (the build environment only
#   contains packages from the given repositories and the project
# * the project's repository might become inconsistent, because Required
#   packages do not block a build. So a package might get published, although
#   a Required package does not build
# For those reasons put Requires also in the BuildRequires list below
BuildRequires:  chmlib-devel >= 0.40
#BuildRequires:  dbus-1-python3 >= 1.2.0
BuildRequires:  chmlib-devel >= 0.40
BuildRequires:  freetype2-devel >= 2.13.2
BuildRequires:  graphite2-devel >= 1.3.14
BuildRequires:  hyphen-devel >= 2.8.8
#upstream use:  iconv >= 1.17
BuildRequires:  liberation-fonts
BuildRequires:  libmtp-devel >= 1.1.21
# Upstream use libopenssl-devel >= 3.1.5
BuildRequires:  libopenssl-3-devel >= 3.1.4
BuildRequires:  libpodofo-devel >= 0.10.3
BuildRequires:  libpoppler-devel >= 21.11.0
BuildRequires:  libstemmer-devel >= 2.2.0
BuildRequires:  libwmf-devel >= 0.2.8
# upstream use: mozjpeg >= 4.0.3
BuildRequires:  optipng >= 0.7.7
# Dont known if upstream need it. It say only podofo. But suse has removed it: 
BuildRequires: podofo >= 0.10.3
BuildRequires:  poppler-tools >= 21.11.0
BuildRequires:  qt6-core-private-devel >= %{my_qtversion}
BuildRequires:  qt6-declarative-devel >= %{my_qtversion}
BuildRequires:  qt6-gui-private-devel >= %{my_qtversion}
BuildRequires:  qt6-imageformats-devel >= %{my_qtversion}
BuildRequires:  qt6-platformsupport-private-devel >= %{my_qtversion}
BuildRequires:  qt6-wayland-devel >= %{my_qtversion}
#BuildRequires:  python311-dbus-python
BuildRequires:  xdg-utils >= 1.0.2
BuildRequires:  pkgconfig(Qt6Core) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6Gui) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6Network) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6Positioning) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6Sensors) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6ShaderTools) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6Svg) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6WebChannel) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6WebEngineCore) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6WebEngineWidgets) >= %{my_qtversion}
BuildRequires:  pkgconfig(Qt6Widgets) >= %{my_qtversion}
BuildRequires:  pkgconfig(dbus-glib-1) >= 0.112
BuildRequires:  pkgconfig(espeak-ng)
BuildRequires:  pkgconfig(fontconfig) >= 2.14.2
BuildRequires:  pkgconfig(glib-2.0) >= 2.70.1
BuildRequires:  pkgconfig(gpg-error) >= 1.43
BuildRequires:  pkgconfig(hunspell) >= 1.7.0
###BuildRequires:  pkgconfig(icu-i18n) < 76.0
BuildRequires:  pkgconfig(icu-i18n) >= 73.2
# Upstream use 7.1
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavdevice)
BuildRequires:  pkgconfig(libavfilter)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libswscale)
#
BuildRequires:  pkgconfig(libffi) >= 3.4.4
BuildRequires:  pkgconfig(libgcrypt) >= 1.9.4
BuildRequires:  pkgconfig(libmspack)
BuildRequires:  pkgconfig(libopenjp2) >= 2.5.0
BuildRequires:  pkgconfig(libpng16) >= 1.6.40
BuildRequires:  pkgconfig(libtiff-4) >= 4.6.0
BuildRequires:  pkgconfig(libusb-1.0) >= 1.0.26
# upstream use BuildRequires:  pkgconfig(ncurses) >= 6.4
BuildRequires:  pkgconfig(ncurses) >= 6.1
BuildRequires:  pkgconfig(readline) >= 8.2
BuildRequires:  pkgconfig(sqlite3) >= 3.43.0
BuildRequires:  pkgconfig(uchardet) >= 0.0.7
# calibre no longer depends on ImageMagick
# but keept BuildRequires to convert icon to serveral sizes
BuildRequires:  pkgconfig(ImageMagick) >= 6.5.9
#
BuildRequires:  jxrlib-devel >= 0.2.4
BuildRequires:  %{python_module Brotli >= 1.1.0}
BuildRequires:  %{python_module FontTools >= 4.39.3}
BuildRequires:  %{python_module Markdown >= 3.3.6}
BuildRequires:  %{python_module Pillow >= 8.4.0}
BuildRequires:  %{python_module Pygments >= 2.10.0}
BuildRequires:  %{python_module apsw >= 3.43.0.0}
BuildRequires:  %{python_module base >= 3.10}
BuildRequires:  %{python_module beautifulsoup4 >= 4.10.0}
BuildRequires:  %{python_module cchardet >= 2.1.7}
BuildRequires:  %{python_module chardet >= 4.0.0}
BuildRequires:  %{python_module css-parser >= 1.0.8}
BuildRequires:  %{python_module dateutil >= 2.8.2}
BuildRequires:  %{python_module devel >= 3.10}
BuildRequires:  %{python_module dnspython >= 2.1.0}
BuildRequires:  %{python_module feedparser >= 6.0.8}
BuildRequires:  %{python_module html2text >= 2020.1.16}
BuildRequires:  %{python_module html5-parser >= 0.4.10}
BuildRequires:  %{python_module html5lib >= 1.1}
BuildRequires:  %{python_module ifaddr >= 0.1.7}
BuildRequires:  %{python_module jeepney >= 0.7.1}
BuildRequires:  %{python_module lxml >= 5.2.1}
BuildRequires:  %{python_module lxml_html_clean}
BuildRequires:  %{python_module mechanize >= 0.4.8}
BuildRequires:  %{python_module msgpack >= 1.0.7}
BuildRequires:  %{python_module multivolumefile >= 0.2.3}
BuildRequires:  %{python_module netifaces >= 0.11.0}
BuildRequires:  %{python_module odfpy}
BuildRequires:  %{python_module packaging >= 21.3}
BuildRequires:  %{python_module ply >= 3.11}
BuildRequires:  %{python_module psutil >= 5.8.0}
BuildRequires:  %{python_module pychm >= 0.8.6}
BuildRequires:  %{python_module pycryptodome >= 3.11.0}
BuildRequires:  libjpeg-turbo >= 3.0.0
BuildRequires:  python-rpm-macros
##BuildRequires:  %%{python_module pykakasi >= 2.3.0}
BuildRequires:  %{python_module pyparsing >= 3.0.6}
BuildRequires:  %{python_module pyppmd >= 1.1.0}
BuildRequires:  %{python_module pyqt-builder >= 1.14.0}
BuildRequires:  %{python_module pyzstd >= 0.15.60}
BuildRequires:  %{python_module qt6-devel >= %{my_qtversion}}
BuildRequires:  %{python_module regex >= 2021.11.10}
# Upstream use: BuildRequires:  %%{python_module setuptools >= 68.2.2}
BuildRequires:  %{python_module setuptools >= 67.8.0}
BuildRequires:  %{python_module qtwebengine-qt6 >= %{my_qtversion}}
BuildRequires:  %{python_module sgmllib3k >= 1.0.0}
BuildRequires:  %{python_module sip-devel >= 6.7.5}
BuildRequires:  %{python_module six >= 1.16.0}
BuildRequires:  %{python_module soupsieve >= 2.5}
BuildRequires:  %{python_module texttable >= 1.6.4}
BuildRequires:  %{python_module toml >= 0.10.2}
BuildRequires:  %{python_module xxhash >= 3.3.0}
BuildRequires:  pkgconfig(libjpeg) >= 3.0.0
BuildRequires:  pkgconfig(libwebp) >= 1.3.2
# Upstream use pkgconfig(libxml-2.0) >= 2.12.6
BuildRequires:  pkgconfig(libxml-2.0) >= 2.10.3
BuildRequires:  pkgconfig(libxslt) >= 1.1.39
#BuildRequires:  python-unrardll >= 0.1.5
BuildRequires:  %{python_module py7zr >= 0.20.6}
BuildRequires:  %{python_module speechd >= 0.11.5}
BuildRequires:  %{python_module webencodings >= 0.5.1}
BuildRequires:  %{python_module zeroconf >= 0.37.0}
#
Requires:       chmlib >= 0.40
#Requires:       dbus-1-python3 >= 1.2.0
Requires:       liberation-fonts
Requires:       libmtp9 >= 1.1.21
Requires:       libpng16-16 >= 1.6.40
Requires:       libwmf >= 0.2.8
Requires:       optipng >= 0.7.7
# Dont known if upstream need it. It say only podofo. But suse has removed it:  
Requires: podofo >= 0.10.1
Requires:       poppler-tools >= 21.11.0
Requires:       %{python_flavor}-Brotli >= 1.1.0
Requires:       %{python_flavor}-Markdown >= 3.3.6
Requires:       %{python_flavor}-Pillow >= 8.4.0
Requires:       %{python_flavor}-Pygments >= 2.10.0
Requires:       %{python_flavor}-apsw >= 3.43.0.0
Requires:       %{python_flavor}-base >= 3.10
Requires:       %{python_flavor}-beautifulsoup4 >= 4.10.0
Requires:       %{python_flavor}-cchardet >= 2.1.7
Requires:       %{python_flavor}-chardet >= 4.0.0
Requires:       %{python_flavor}-css-parser >= 1.0.8
Requires:       %{python_flavor}-dateutil >= 2.8.2
#Requires:       %%{python_flavor}-dbus-python
Requires:       %{python_flavor}-dnspython >= 2.1.0
Requires:       %{python_flavor}-FontTools >= 4.39.3
Requires:       %{python_flavor}-PyQt6-sip >= 13.5.2
Requires:       %{python_flavor}-feedparser >= 6.0.8
Requires:       %{python_flavor}-html2text >= 2020.1.16
Requires:       %{python_flavor}-html5-parser >= 0.4.10
Requires:       %{python_flavor}-html5lib >= 1.1
Requires:       %{python_flavor}-ifaddr >= 0.1.7
Requires:       %{python_flavor}-jeepney >= 0.7.1
Requires:       %{python_flavor}-lxml >= 5.2.1
Requires:       %{python_flavor}-lxml_html_clean
Requires:       %{python_flavor}-mechanize >= 0.4.8
Requires:       %{python_flavor}-msgpack >= 1.0.7
Requires:       %{python_flavor}-multivolumefile >= 0.2.3
Requires:       %{python_flavor}-netifaces >= 0.11.0
Requires:       %{python_flavor}-odfpy
Requires:       %{python_flavor}-ply >= 3.11
Requires:       %{python_flavor}-psutil >= 5.8.0
Requires:       %{python_flavor}-pychm >= 0.8.6
Requires:       %{python_flavor}-pycryptodome >= 3.11.0
##Requires:       %%{python_flavor}-pykakasi >= 2.3.0
Requires:       %{python_flavor}-pyparsing >= 3.0.6
Requires:       %{python_flavor}-pyppmd >= 1.1.0
Requires:       %{python_flavor}-pyzstd >= 0.15.6
Requires:       %{python_flavor}-qt6 >= %{my_qtversion}
Requires:       %{python_flavor}-qtwebengine-qt6 >= %{my_qtversion}
Requires:       %{python_flavor}-regex >= 2021.11.10
Requires:       %{python_flavor}-sgmllib3k >= 1.0.0
Requires:       %{python_flavor}-six >= 1.16.0
Requires:       %{python_flavor}-soupsieve >= 2.5
Requires:       %{python_flavor}-texttable >= 1.6.4
Requires:       %{python_flavor}-xxhash >= 3.3.0
#Requires:       %%{python_flavor}-unrardll >= 0.1.5
Requires:       %{python_flavor}-py7zr >= 0.20.6
Requires:       %{python_flavor}-speechd >= 0.11.5
Requires:       %{python_flavor}-webencodings >= 0.5.1
Requires:       %{python_flavor}-zeroconf >= 0.37.0
#
Requires:       sqlite3 >= 3.43.0
Requires:       bzip2 >= 1.0.8
# Upstream use expat >= 2.5.0
Requires:       expat >= 2.4.4
Requires:       libsqlite3-0 >= 3.43.0
Requires:       unrar >= 6.2.11
Requires:       xdg-utils >= 1.0.2
Requires:       xz >= 5.4.1
Requires:       zlib >= 1.2.13

Requires(pretrans): findutils

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Calibre is an ebook library manager. It can view, convert and catalog
ebooks in most of the major ebook formats. It can also talk to a few
ebook reader devices. It can go out on the Internet and fetch
metadata for books. It can download newspapers and convert them
into ebooks for convenient reading.

%prep
%setup -q -a5 -a6
%patch -P 2 -p1
%patch -P 3 -p1 -b .no-update

# dos2unix newline conversion
sed -i 's/\r//' src/calibre/web/feeds/recipes/*

# remove shebangs
sed -i -e '/^#!\//, 1d' src/calibre/*/*/*/*/*.py
sed -i -e '/^#!\//, 1d' src/calibre/*/*/*/*.py
sed -i -e '/^#!\//, 1d' src/calibre/*/*/*.py
sed -i -e '/^#![ ]*\//, 1d' src/calibre/*/*.py
sed -i -e '/^#!\//, 1d' src/calibre/*.py
sed -i -e '/^#!\//, 1d' src/templite/*.py
sed -i -e '/^#!\//, 1d' src/tinycss/*.py
sed -i -e '/^#!\//, 1d' src/tinycss/*/*.py
sed -i -e '/^#!\//, 1d' resources/default_tweaks.py

# remove the executable flag from files
find src/calibre -name "*.py" -type f -exec chmod -x {} +
chmod -x recipes/*.recipe

# rpmlint: wrong-script-interpreter /usr/bin/env python3
##find setup -type f  | xargs sed -i -e 's|#!/usr/bin/env 
python|#!/usr/bin/python3|g'

# use system mspack (mga#15218)
##rm -f src/calibre/utils/lzx/mspack.h
##sed -i 's| calibre/utils/lzx/mspack.h||' setup/extensions.json

%build
%if 0%{?suse_version} <= 1500
export CC=gcc-12
export CXX=g++-12
%endif
export \
LANG="en_US.UTF8" \
CFLAGS="%{optflags}" \
CXXFLAGS="%{optflags}"

###python setup.py build
CALIBRE_PY3_PORT=1 python%python_bin_suffix setup.py build

#python%%python_bin_suffix setup.py iso639
#python%%python_bin_suffix setup.py iso3166
#python%%python_bin_suffix setup.py translations
python%python_bin_suffix setup.py gui

#%%{__python3} setup.py resources \
#       --path-to-liberation_fonts %%{_datadir}/fonts/truetype \
#       --system-liberation_fonts \
#       --path-to-hyphenation `pwd`/dictionaries-master \
#       --path-to-mathjax `pwd`/MathJax-3.1.4
#%%{__python%%python_bin_suffix} setup.py man_pages

%install
###python setup.py install \
CALIBRE_PY3_PORT=1 python%python_bin_suffix setup.py install \
   --prefix=%{_prefix} \
   --root=%{buildroot}%{_prefix} \
   --staging-bindir=%{buildroot}%{_bindir} \
   --staging-libdir=%{buildroot}%{_libdir} \
   --staging-sharedir=%{buildroot}%{_datadir} \
   --staging-mandir=%{buildroot}%{_mandir} \
   --libdir=%{_libdir}

# GENERATE AND INSTALL HIRES ICONS INTO HICOLOR DIR (PRESENT ICON LOOKS BLURRED 
ON HiDPI)
for i in 24 32 48 64 128 256 512
do
  mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
  convert -strip icons/calibre.png \
          -resize ${i}x${i} 
%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done

%suse_update_desktop_file -i -n -N "Calibre E-Book Management" -G "Calibre 
E-Book library management" calibre-gui
%suse_update_desktop_file -i -n -N "Calibre E-Book Editor" -G "Calibre Editor 
for E-Books" calibre-ebook-edit
%suse_update_desktop_file -i -n -N "Calibre E-Book Viewer" -G "Calibre Viewer 
for E-Books" calibre-ebook-viewer
%suse_update_desktop_file -i -n -N "Calibre LRF Viewer" -G "Calibre Viewer for 
LRF files" calibre-lrfviewer

# rpmlint: wrong-script-interpreter /usr/bin/env python3
find %{buildroot}%{_bindir} -type f  | xargs sed -i -e 's:#!/usr/bin/env 
python3:#!/usr/bin/python%python_bin_suffix:g'
find %{buildroot}%{_libdir}/calibre -type f  | xargs sed -i -e 
's:#!/usr/bin/env python3:#!/usr/bin/python%python_bin_suffix:g'

# these are provided as separate packages
rm -r %{buildroot}%{_libdir}/%{name}/odf

# Also the Liberation fonts are provided as separate
# packages, but a symbolic link to each is needed.
for font in %{buildroot}%{_datadir}/%{name}/fonts/liberation/*.ttf
do
    rm ${font}
    ln -s %{_datadir}/fonts/truetype/$(basename ${font}) 
%{buildroot}%{_datadir}/%{name}/fonts/liberation/
done

# Fix missing user-agent-data.json
# With version 6.15.0 it is available again. So we use it again from source but 
let the code in.
#install -Dm 0644 %%{SOURCE8} 
%%{buildroot}%%{_datadir}/%%{name}/user-agent-data.json

%fdupes %{buildroot}%{_prefix}

# bsc#1022710, bsc#1104597: fix upgrade
# liberation had become a symlink in Leap and RPM does not like to overwrite a 
directory with a symlink (or vice versa).
# Later, liberation became a directory again.
# This scriptlet supports both upgrade scenarios.  Sort of.
# When converting from a link into a directory, it will complain about 
conflicting files with liberation-fonts.

%pretrans -p <lua>
path = "%{_datadir}/%{name}/fonts/liberation"
st = posix.stat(path)
if st and st.type == "link" then
   os.remove(path)
end
-- This depends on the assumption that the directory should only contain 
symbolic links.
if st and st.type == "directory" then
  os.execute("find " .. path .. " -type f -delete")
end

%check
# don't know why Leap rise up an error. Does anyone know the reason?
%if 0%{?suse_version} > 1500
TEST_EXCLUDE=(
    --exclude-test-name unrar                       # is not in openSUSE oss
    --exclude-test-name zeroconf                    # rise up build error
%if 0%{?suse_version} >= 1600
    --exclude-test-name test_fts_basic              # rise up build error
    --exclude-test-name test_websocket_basic        # rise up build error
    --exclude-test-name test_piper                  # rise up build error
    --exclude-test-name test_pykakasi               # is not in openSUSE oss
    --exclude-test-name test_import_of_all_python_modules # rise up build error 
because of pykakasi
%endif
)

CALIBRE_PY3_PORT=1 SKIP_QT_BUILD_TEST=1 python%python_bin_suffix setup.py test 
"${TEST_EXCLUDE[@]}"
%endif

%if 0%{?suse_version} <= 1320
%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files
# -f %%{name}.lang  -f iso639.lang
%license COPYRIGHT LICENSE LICENSE.rtf
%{_bindir}/*
%{_datadir}/applications/%{name}-gui.desktop
%{_datadir}/applications/%{name}-ebook-edit.desktop
%{_datadir}/applications/%{name}-ebook-viewer.desktop
%{_datadir}/applications/%{name}-lrfviewer.desktop
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/mimetypes/*.png
%{_datadir}/mime/packages/calibre-mimetypes.xml
%{_datadir}/%{name}/
%{_datadir}/%{name}/user-agent-data.json
%{_libdir}/%{name}/
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/%{name}-gui.metainfo.xml
%{_datadir}/metainfo/%{name}-ebook-edit.metainfo.xml
%{_datadir}/metainfo/%{name}-ebook-viewer.metainfo.xml
%{_datadir}/bash-completion/completions/%{name}*
%{_datadir}/bash-completion/completions/*ebook*
%{_datadir}/bash-completion/completions/lrf*
%{python_sitearch}/init_calibre.py

%changelog

++++++ calibre-no-update.diff ++++++
Index: calibre-7.23.0/src/calibre/gui2/main.py
===================================================================
--- calibre-7.23.0.orig/src/calibre/gui2/main.py
+++ calibre-7.23.0/src/calibre/gui2/main.py
@@ -52,8 +52,9 @@ various URL based actions is in the User
                       help=_('Start minimized to system tray.'))
     parser.add_option('-v', '--verbose', default=0, action='count',
                       help=_('Ignored, do not use. Present only for legacy 
reasons'))
-    parser.add_option('--no-update-check', default=False, action='store_true',
-            help=_('Do not check for updates'))
+    parser.add_option('--update-check', dest='no_update_check', default=True,
+            action='store_false',
+            help=_('Check for updates'))
     parser.add_option('--ignore-plugins', default=False, action='store_true',
             help=_('Ignore custom plugins, useful if you installed a plugin'
                 ' that is preventing calibre from starting'))

++++++ calibre-rpmlintrc ++++++
# # Output filters 
addFilter("non-executable-script")
#addFilter("pem-certificate")
addFilter("explicit-lib-dependency")

++++++ calibre-setup.install.py.diff ++++++
diff -Pdpru calibre-5.15.0.orig/setup/install.py calibre-5.15.0/setup/install.py
--- calibre-5.15.0.orig/setup/install.py        2021-04-16 04:20:00.000000000 
+0200
+++ calibre-5.15.0/setup/install.py     2021-04-16 11:51:25.550511789 +0200
@@ -87,10 +87,12 @@ class Develop(Command):
         if not opts.prefix:
             opts.prefix = sys.prefix
         for x in ('prefix', 'libdir', 'bindir', 'sharedir', 'staging_root',
-                'staging_libdir', 'staging_bindir', 'staging_sharedir'):
+                'staging_libdir', 'staging_bindir', 'staging_sharedir',
+                'mandir', 'locale_dir'):
             o = getattr(opts, x, None)
             if o:
                 setattr(opts, x, os.path.abspath(o))
+        self.info( "****", opts, self )
         self.libdir = getattr(opts, 'libdir', None)
         if self.libdir is None:
             self.libdir = self.j(opts.prefix, 'lib')
@@ -98,6 +100,9 @@ class Develop(Command):
         if self.bindir is None:
             self.bindir = self.j(opts.prefix, 'bin')
         self.sharedir = getattr(opts, 'sharedir', None)
+        self.mandir = getattr(opts, 'mandir', None)
+        if self.mandir is None:
+            self.mandir = self.j(opts.prefix, 'share')
         if self.sharedir is None:
             self.sharedir = self.j(opts.prefix, 'share')
         if not getattr(opts, 'staging_root', None):
@@ -111,9 +116,17 @@ class Develop(Command):
         self.staging_sharedir = getattr(opts, 'staging_sharedir', None)
         if self.staging_sharedir is None:
             self.staging_sharedir = opts.staging_sharedir = 
self.j(opts.staging_root, 'share')
+        self.staging_mandir = getattr(opts, 'staging_mandir', None)
+        if self.staging_mandir is None:
+            self.staging_mandir = opts.staging_mandir = 
self.j(opts.staging_root, 'man')
+        self.staging_localedir = getattr(opts, 'staging_localedir', None)
+        if self.staging_localedir is None:
+            self.staging_localedir = opts.staging_localedir = 
self.j(opts.staging_root, 'usr/share/locale')
 
         self.staging_libdir = opts.staging_libdir = 
self.j(self.staging_libdir, 'calibre')
         self.staging_sharedir = opts.staging_sharedir = 
self.j(self.staging_sharedir, 'calibre')
+        self.staging_mandir = opts.staging_mandir = 
self.j(self.staging_mandir, '')
+        self.staging_localedir = opts.staging_localedir = 
self.j(self.staging_localedir, '')
         self.system_plugins_loc = opts.system_plugins_location
 
         if self.__class__.__name__ == 'Develop':
@@ -125,6 +138,8 @@ class Develop(Command):
             self.info('INSTALL paths:')
             self.info('\tLIB:', self.staging_libdir)
             self.info('\tSHARE:', self.staging_sharedir)
+            self.staging_mandir =self.j(self.mandir, '')
+            # self.mandir = self.j(opts.staging_root, 'man')
 
     def pre_sub_commands(self, opts):
         if not (islinux or isbsd or ishaiku):
@@ -250,6 +265,11 @@ class Install(Develop):
                     'the launcher scripts. This option controls the prefix '
                     'to which the install will actually copy files. By default 
'
                     'it is set to the value of --prefix.'))
+        parser.add_option('--staging-mandir',
+            help='Where to put the calibre manpage files. Default is 
<root>/man')
+        parser.add_option('--staging-locale-dir',
+            dest="staging_localedir",
+            help="Where to put the calibre locale files. Default is 
<root>/share/locale")
         parser.add_option('--staging-libdir',
             help='Where to put calibre library files. Default is <root>/lib')
         parser.add_option('--staging-bindir',
@@ -260,6 +280,49 @@ class Install(Develop):
                 help='Path to a directory from which the installed calibre 
will load plugins')
         self.add_postinstall_options(parser)
 
+    def install_localefiles(self):
+      """Install the .mo files"""
+      #if not self.locale_dir.startswith( sys.prefix ):
+      #  # We don't want to disturb installation when option --locale-dir is 
not set
+      #  return
+      locale = os.path.join(self.RESOURCES, "localization/locales")
+      dest = self.staging_localedir
+      self.info("Installing locale files...")
+      self.info("*** locale_dir:", dest)
+      self.info("*** SRC:", self.SRC)
+      self.info("*** DEST:", dest)
+      if not os.path.exists(dest):
+        os.makedirs(dest)
+      for lang in os.listdir( locale ):
+        j = os.path.join(locale, lang)
+        dd = os.path.join(dest, lang)
+        if os.path.exists(dd):
+            shutil.rmtree(dd)
+        lc_message_dest = os.path.join(dest, lang, 'LC_MESSAGES')
+        lc_message = os.path.join(locale, lang, "LC_MESSAGES")
+        self.info("Creating locale directory %s " % lc_message_dest)
+        os.makedirs( lc_message_dest )
+        filedict = { 
+           'iso639.mo': 'iso639.mo',
+           'messages.mo': 'calibre.mo',
+           'qt.qm': '',
+          }
+        for f in os.listdir(lc_message):
+          destfile = filedict.get(f)
+          if destfile != '':
+            self.info("Moving %s -> %s" % (lang, dd))
+            shutil.move(os.path.join(lc_message, f), 
+                        os.path.join(dest, lang, 'LC_MESSAGES', destfile ))
+
+        
+        #shutil.move(os.path.join(locale,i), dest)
+        # Rename that beast:
+        #shutil.move(os.path.join(dest, i, 'LC_MESSAGES/messages.mo'),
+        #            os.path.join(dest, i, 'LC_MESSAGES/calibre.mo'))
+        #os.remove( os.path.join(dest, i, 'LC_MESSAGES/qt.qm' )
+        #shutil.copytree(j, dd )
+      shutil.rmtree(os.path.join(self.RESOURCES, "localization/locales") )
+
     def install_files(self):
         dest = self.staging_libdir
         if os.path.exists(dest):

++++++ user-agent-data.json ++++++
++++ 784 lines (skipped)

Reply via email to