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

#
# spec file for package proton-vpn-gtk-app
#
# Copyright (c) 2025 mantarimay
# 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/
#


Name:           proton-vpn-gtk-app
Version:        4.9.6
Release:        0
Summary:        Proton VPN GTK app for Linux
License:        GPL-3.0-or-later
Group:          Productivity/Networking/Security
URL:            https://github.com/ProtonVPN/proton-vpn-gtk-app
Source:         %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  gobject-introspection
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
Requires:       python3-%{name} = %version
BuildArch:      noarch
%define python_subpackage_only 1
%python_subpackages

%description
The Proton VPN GTK app is intended for every Proton VPN service user, it
provides full access to all functionalities available to authenticated
users, with the user signup process handled on the website.

%package -n python-%{name}
Summary:        Python library for %{name}
Group:          Development/Languages/Python
Requires:       python3-cairo
Requires:       python3-dbus-python
Requires:       python3-distro
Requires:       python3-gobject
Requires:       python3-packaging
Requires:       python3-requests
Requires:       python3-proton-core
Requires:       python3-proton-vpn-api-core
Requires:       python3-proton-keyring-linux
Requires:       python3-proton-vpn-network-manager
Requires:       python3-proton-vpn-local-agent

%description -n python-%{name}
The direct Python interface into %{name}.

%prep
%autosetup

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}/%{$python_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

%files -n proton-vpn-gtk-app
%doc README.md
%license LICENSE
%{_bindir}/protonvpn-app
%{_datadir}/icons/hicolor/scalable/apps/proton-vpn-logo.svg
%{_datadir}/applications/protonvpn-app.desktop

%files %{python_files proton-vpn-gtk-app}
%{python_sitelib}/p*

%changelog
openSUSE Build Service is sponsored by