File Photini.spec of Package Photini

#
# spec file for package Photini
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#


Name:           Photini
Version:        2025.10.0
Release:        0
Summary:        Digital photograph metadata (EXIF, IPTC, XMP) editing application
License:        GPL-3.0-or-later
Group:          Productivity/Graphics/Other
URL:            https://github.com/jim-easterbrook/Photini
Source0:        https://github.com/jim-easterbrook/Photini/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  ImageMagick
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python3-Pillow
BuildRequires:  python3-appdirs >= 1.3
BuildRequires:  python3-cachetools
BuildRequires:  python3-chardet
BuildRequires:  python3-devel
BuildRequires:  python3-filetype
BuildRequires:  python3-pip
BuildRequires:  python3-platformdirs
BuildRequires:  python3-qtwebengine-qt5
BuildRequires:  python3-setuptools
BuildRequires:  python3-setuptools_scm
BuildRequires:  python3-wheel
Requires:       ffmpeg
Requires:       libgexiv2-2 >= 0.5
Requires:       python3-appdirs >= 1.3
Requires:       python3-exiv2
Requires:       python3-gobject
Requires:       python3-gpxpy
Requires:       python3-keyring
Requires:       python3-requests >= 2.4.0
Requires:       python3-requests-oauthlib
Requires:       python3dist(pyqtwebengine)
Requires:       typelib(GExiv2)
Conflicts:      python3-keyring-keyutils
BuildArch:      noarch

%description
A digital photograph metadata (EXIF, IPTC, XMP) editing application.

"Metadata" is said to mean "data about data". In the context of digital
photographs, this means information that is not essential in order to display
the image, but tells something about it. For example, a title and
description of the scene or the date and time and the GPS coordinates of the
camera's position when the picture was taken.

%prep
%autosetup -p1

%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%python3_pyproject_wheel

%install
%python3_pyproject_install
cp -r src/photini/data %{buildroot}%{python3_sitelib}/photini/data
export PYTHONPATH=%{buildroot}%{python3_sitelib}
#%{buildroot}%{_bindir}/photini-configure
%{buildroot}%{_bindir}/photini-post-install
sed -i 's#^Exec=[^\s]\+#Exec=/usr/bin/photini#g' \
   ~/.local/share/applications/photini.desktop
install -Dm0644 ~/.local/share/applications/photini.desktop \
   %{buildroot}%{_datadir}/applications/photini.desktop
%fdupes %{buildroot}

%files
%doc CHANGELOG.txt README.rst
%license LICENSE.txt
%{_bindir}/photini
%{_bindir}/photini-configure
%{_bindir}/photini-post-install
%{python3_sitelib}/[Pp]hotini-%{version}.dist-info
%{python3_sitelib}/photini
%{_datadir}/applications/photini.desktop

%changelog
openSUSE Build Service is sponsored by