# # spec file for package python-mat2 # # 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 base_name libmat2 %define short_name mat2 %define skip_python311 1 %define skip_python312 1 Name: python-mat2 Version: 0.13.5 Release: 0 Summary: A handy tool to trash your metadata Group: Productivity/Graphics/Other License: LGPL-3.0+ #URL: https://0xacab.org/jvoisin/mat2 URL: https://github.com/jvoisin/mat2 Source: https://files.pythonhosted.org/packages/source/m/mat2/mat2-%{version}.tar.gz Source99: %{name}-rpmlintrc ### 20250210, can be removed next update #Patch0: PyGObject-fix.diff ##### BuildRequires: python-rpm-macros BuildRequires: %{python_module gobject} BuildRequires: %{python_module mutagen} BuildRequires: %{python_module pip} BuildRequires: %{python_module pycairo} BuildRequires: %{python_module setuptools} BuildRequires: fdupes Requires: exiftool Requires: python3-mutagen Requires: python3-pycairo ### 20250210, this seems to work better #Requires: python3-gobject Requires: python3-pygobject ##### Requires(post): update-alternatives Requires(postun): update-alternatives Recommends: typelib-1_0-Rsvg-2_0 Recommends: typelib-1_0-Poppler-0_18 Recommends: typelib-1_0-GdkPixbuf-2_0 Recommends: perl-Image-ExifTool Recommends: bubblewrap Recommends: (ffmpeg-4 or ffmpeg-5 or ffmpeg-6) Recommends: %{name}-manpage BuildArch: noarch %python_subpackages %description Metadata consist of information that characterizes data. Metadata are used to provide documentation for data products. In essence, metadata answer who, what, when, where, why, and how about every facet of the data that are being documented. Metadata within a file can tell a lot about you. Cameras record data about when a picture was taken and what camera was used. Office documents like PDF or Office automatically adds author and company information to documents and spreadsheets. Maybe you don't want to disclose those information. This is precisely the job of mat2: getting rid, as much as possible, of metadata. mat2 provides a command line tool, and graphical user interfaces via a service menu for Dolphin, the default file manager of KDE, and an extension for Nautilus, the default file manager of GNOME. %package -n %{name}-manpage Summary: Manpage for %{name} #Provides: python39-mat2-manpage #Provides: python310-mat2-manpage #Provides: python311-mat2-manpage Requires: python3-mat2 Requires: man Supplements: (%{name} and man) BuildArch: noarch %description -n %{name}-manpage Manual page for %{name}. %prep %setup -q -n mat2-%{version} %patch -P 0 find . -type f -exec sed -i 's@#!%{_bindir}/env python3$@#!%{_bindir}/python3@' {} + %build #%%python_build %pyproject_wheel %install #%%python_install %pyproject_install %python_clone -a %{buildroot}%{_bindir}/mat2 %python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand chmod -v 755 %{buildroot}%{$python_sitelib}/libmat2/__init__.py %post %python_install_alternative mat2 %postun %python_uninstall_alternative mat2 %files %{python_files} %doc README.md %python_alternative %{_bindir}/mat2 %{python_sitelib}/%{base_name}* #%%{python_sitelib}/%%{short_name}-%%{version}-*.egg-info #%%{python_sitelib}/%%{short_name}-%%{version}-*.egg-info/* %{python_sitelib}/%{short_name}-%{version}.dist-info %files -n %{name}-manpage %{_mandir}/man1/%{short_name}.1%?ext_man %changelog