diff --git a/packages/m/mcomix/.files b/packages/m/mcomix/.files
index b047962be5c..b13e90ac27d 100644
Binary files a/packages/m/mcomix/.files and b/packages/m/mcomix/.files differ
diff --git a/packages/m/mcomix/.rev b/packages/m/mcomix/.rev
index 5643f1dd975..f93504d5237 100644
--- a/packages/m/mcomix/.rev
+++ b/packages/m/mcomix/.rev
@@ -77,4 +77,26 @@
1128167
+
+ 1e476f64842566c187e583f3c8776541
+ 3.1.0
+
+ anag+factory
+ - update to 3.1.0:
+ * Image colors can be negated in the Image Enhancement dialog.
+ * "Fit to size" has been generalised.
+ * Fixed regression from 2.0.0 in Library collection list.
+ * Added official MIME types for CBZ/CBR files
+ * Improved robustness to invalid UTF-8
+- update to 3.0.0:
+ * MComix uses pyproject.toml instead of the now obsolete setup.py
+ * application meta files are no longer copied automatically by
+ the installation process
+ * Fixed bug in Python PDF extraction that prevented rotated PDF
+ images being displayed without rotation.
+ * MComix previously didn't remember to restore the "maximized"
+ window state when restarting.
+
+ 1175872
+
diff --git a/packages/m/mcomix/mcomix-2.3.0.tar.gz b/packages/m/mcomix/mcomix-2.3.0.tar.gz
deleted file mode 120000
index bf4b7b4ebb4..00000000000
--- a/packages/m/mcomix/mcomix-2.3.0.tar.gz
+++ /dev/null
@@ -1 +0,0 @@
-/ipfs/bafybeic5mznz2shsuf4lm3jmakpuzfq2s2pytmt3libno5szc42isnub6y
\ No newline at end of file
diff --git a/packages/m/mcomix/mcomix-3.1.0.tar.gz b/packages/m/mcomix/mcomix-3.1.0.tar.gz
new file mode 120000
index 00000000000..5a630d9cdec
--- /dev/null
+++ b/packages/m/mcomix/mcomix-3.1.0.tar.gz
@@ -0,0 +1 @@
+/ipfs/bafybeicr665isttbvw7xljw3nunwenmrwfdhjjejun7zuc37ync4b3s7uy
\ No newline at end of file
diff --git a/packages/m/mcomix/mcomix.changes b/packages/m/mcomix/mcomix.changes
index 002842c84d1..bcf69b81e96 100644
--- a/packages/m/mcomix/mcomix.changes
+++ b/packages/m/mcomix/mcomix.changes
@@ -1,3 +1,21 @@
+-------------------------------------------------------------------
+Tue May 21 15:32:29 UTC 2024 - Giacomo Comes
+
+- update to 3.1.0:
+ * Image colors can be negated in the Image Enhancement dialog.
+ * "Fit to size" has been generalised.
+ * Fixed regression from 2.0.0 in Library collection list.
+ * Added official MIME types for CBZ/CBR files
+ * Improved robustness to invalid UTF-8
+- update to 3.0.0:
+ * MComix uses pyproject.toml instead of the now obsolete setup.py
+ * application meta files are no longer copied automatically by
+ the installation process
+ * Fixed bug in Python PDF extraction that prevented rotated PDF
+ images being displayed without rotation.
+ * MComix previously didn't remember to restore the "maximized"
+ window state when restarting.
+
-------------------------------------------------------------------
Wed Nov 22 16:03:49 UTC 2023 - Giacomo Comes
diff --git a/packages/m/mcomix/mcomix.spec b/packages/m/mcomix/mcomix.spec
index aeda01d4b21..13317d693ff 100644
--- a/packages/m/mcomix/mcomix.spec
+++ b/packages/m/mcomix/mcomix.spec
@@ -1,7 +1,7 @@
#
# spec file for package mcomix
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,19 +21,18 @@
%if 0%{?suse_version} > 1500
%define pythons python3
%endif
-%if 0%{?sle_version} == 0150400
-%define pythons python310
-%endif
Name: mcomix
-Version: 2.3.0
+Version: 3.1.0
Release: 0
Summary: Comics Viewer
License: GPL-2.0-only
Group: Productivity/Graphics/Viewers
URL: https://sourceforge.net/p/mcomix/wiki/Home/
Source0: https://sourceforge.net/projects/mcomix/files/MComix-%{version}/%{name}-%{version}.tar.gz
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: gobject-introspection
%if 0%{?suse_version} > 1500
Requires: python3-PyMuPDF
@@ -63,14 +62,23 @@ Comics Viewer forked from comix.
find . -type f | xargs chmod a-x
%build
+%pyproject_wheel
%install
-%python_exec setup.py install --single-version-externally-managed --root %{buildroot} --prefix "%{_prefix}"
+%pyproject_install
{
echo '%defattr(-,root,root,-)'
%{python_expand ls %{buildroot}%{$python_sitelib}/mcomix/messages/*/LC_MESSAGES/mcomix.mo | \
sed 's@%{buildroot}\(%{$python_sitelib}/mcomix/messages/\([^/]\+\)/LC_MESSAGES/mcomix.mo\)@%lang(\2) \1@' }
} | tee %{name}.lang
+install -Dm 644 share/applications/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
+for a in share/icons/hicolor/* ; do
+ install -Dm 644 -t %{buildroot}%{_datadir}/icons/hicolor/${a##*/}/apps $a/apps/*
+ [[ -d $a/mimetypes ]] && install -Dm 644 -t %{buildroot}%{_datadir}/icons/hicolor/${a##*/}/mimetypes $a/mimetypes/*
+done
+install -Dm 644 share/mime/packages/%{name}.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml
+install -Dm 644 share/metainfo/%{name}.metainfo.xml %{buildroot}%{_datadir}/metainfo/%{name}.metainfo.xml
+install -Dm 644 share/man/man1/%{name}.1.gz -t %{buildroot}%{_datadir}/man/man1
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_datadir}/icons
@@ -89,7 +97,7 @@ find . -type f | xargs chmod a-x
%{python_sitelib}/mcomix/archive/
%{python_sitelib}/mcomix/__pycache__/
%{python_sitelib}/mcomix/_vendor/
-%{_datadir}/appdata/*
+%{_datadir}/metainfo/*
%{_datadir}/applications/mcomix.desktop
%{_datadir}/icons/hicolor
%{_datadir}/mime/packages/mcomix.xml