File proton-vpn-gtk-app.spec of Package proton-vpn-gtk-app

#
# spec file for package proton-vpn-gtk-app
#
# Copyright (c) 2023 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 pythons python3
Name:           proton-vpn-gtk-app
Version:        4.4.4
Release:        0
Summary:        Official Proton VPN GUI
License:        GPL-3.0-or-later
Group:          Productivity/Networking/Security
URL:            https://github.com/ProtonVPN/linux-app
Source:         %{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  gobject-introspection
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-rpm-macros
BuildRequires:  python3-pytest
BuildRequires:  python3-setuptools
BuildRequires:  update-desktop-files
Requires:       gtk3
Requires:       python3-dbus-python
Requires:       librsvg
Requires:       python3.11dist(proton-core)
Requires:       python3.11dist(proton-vpn-api-core)
Requires:       python3.11dist(proton-vpn-killswitch-network-manager)
Requires:       python3.11dist(proton-vpn-killswitch-network-manager-wireguard)
Requires:       python3.11dist(proton-keyring-linux)
Requires:       python3.11dist(proton-keyring-linux-secretservice)
Requires:       python3.11dist(proton-vpn-logger)
Requires:       python3.11dist(proton-vpn-network-manager)
Requires:       python3.11dist(proton-vpn-network-manager-openvpn)
Requires:       python3.11dist(proton-vpn-network-manager-wireguard)
Requires:       python3-gobject
Requires:       python311-sentry-sdk
Requires:       python3-packaging
Requires:       libappindicator-gtk3
BuildArch:      noarch

%description
The Proton VPN GUI is intended for every Proton VPN service user.

%prep
%autosetup

%build
%python3_build

%install
%python3_install
%fdupes %{buildroot}%{python3_sitelib}/

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
mkdir -p %{buildroot}%{_datadir}/applications
cp rpmbuild/SOURCES/proton-vpn-logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/proton-vpn-logo.svg
cp rpmbuild/SOURCES/protonvpn-app.desktop %{buildroot}%{_datadir}/applications/protonvpn-app.desktop

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/protonvpn-app.desktop
# It's only a placeholder test, but catch it for future upstream improvements
#pytest

%files
%doc README.md
%license LICENSE
%{python3_sitelib}/proton/
%{python3_sitelib}/proton_vpn_gtk_app-*.egg-info/
%{_bindir}/protonvpn-app
%{_datadir}/icons/hicolor/scalable/apps/proton-vpn-logo.svg
%{_datadir}/applications/protonvpn-app.desktop

%changelog
openSUSE Build Service is sponsored by