File protonvpn-cli.spec of Package protonvpn-cli

#
# spec file for package protonvpn-cli
#
# Copyright (c) 2022 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 unmangled_name protonvpn-cli
%define build_tar_ball 0

Prefix:         %{_prefix}

Name:           protonvpn-cli
Version:        3.13.0
Release:        0
Summary:        Official ProtonVPN CLI

Group:          ProtonVPN
License:        GPL-3.0-only
URL:            https://github.com/ProtonVPN
%if %{build_tar_ball}
Source0:        %{unmangled_name}-%{version}.tar.gz
%else
Source0:        _service
%endif
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  pcre
BuildRequires:  python-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

# %%{?python_disable_dependency_generator}
Requires:       python3-protonvpn-nm-lib >= 3.13
Requires:       python3-pythondialog

%description
Official ProtonVPN CLI.

%prep
%if %{build_tar_ball}
%setup -n %{unmangled_name}-%{version} -n %{unmangled_name}-%{version} -n linux-cli-%{version}
%else
%setup -n %_sourcedir/%{unmangled_name}-%{version} -n %_sourcedir/%{unmangled_name}-%{version} -n %_sourcedir/linux-cli-%{version} -T -D
%endif

%build
python3 setup.py build

%install
python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=%_sourcedir/INSTALLED_FILES

%files -f %_sourcedir/INSTALLED_FILES
%{python3_sitelib}/protonvpn_cli/
%{python3_sitelib}/protonvpn_cli-*.egg-info/
%defattr(-,root,root)

%changelog

* Fri Sep 24 2021 Proton Technologies AG <opensource@proton.me> 3.10.1-1
- Improve: Exception handling

* Fri Sep 24 2021 Proton Technologies AG <opensource@proton.me> 3.10.0-1
- Handle human verification

* Thu Sep 30 2021 Proton Technologies AG <opensource@proton.me> 3.9.1-1
- Fix: VPN Accelerator setting (unable to either disable or enable it)

* Mon Aug 09 2021 Proton Technologies AG <opensource@proton.me> 3.9.0-1
- Feature: Add alternative routing option

* Fri Jun 16 2021 Proton Technologies AG <opensource@proton.me> 3.8.0-2
- Fix: When adding custom DNS IP it will no longer automatically set "automatic DNS"
- Fix: Add VPN Accelerator setting
- Feature: Add alternative routing option

* Mon Jun 28 2021 Proton Technologies AG <opensource@proton.me> 3.7.2-2
- Fix: Update README.md and create USAGE.md

* Tue Jun 22 2021 Proton Technologies AG <opensource@proton.me> 3.7.1-1
- Hotfix: Display force disable connectivity check message in case of failure

* Fri Jun 18 2021 Proton Technologies AG <opensource@proton.me> 3.7.0-3
- Feature: Generate and provide easy access to logs

* Fri May 21 2021 Proton Technologies AG <opensource@proton.me> 3.6.0-5
- Update to latest library version (3.2.0 =< and < 3.3.0)

* Thu May 20 2021 Proton Technologies AG <opensource@proton.me> 3.5.3-2
- Bugfix: fixed crash when trying to display netshield help

* Wed May 19 2021 Proton Technologies AG <opensource@proton.me> 3.5.2-2
- Bugfix: fixed crash when trying to display netshield status

* Fri Apr 30 2021 Proton Technologies AG <opensource@proton.me> 3.5.1-1
- Update dependency (protonvpn-nm-lib) version

* Tue Mar 30 2021 Proton Technologies AG <opensource@proton.me> 3.5.0-2
- Handle servers with multiple features
- Fix server feature issue when displaying connection status

* Tue Mar 30 2021 Proton Technologies AG <opensource@proton.me> 3.4.1-4
- Fix dialog crash
- Remove "-" when displaying DNS servers after being added
- Add "config --list" to help message
- User CLI logger instead of lib logger
- Catch unexpected exceptions upon setting up reconnect and upon connect()
- Adopt new library exceptions for improved error handling
- Add confirmation upon logout if VPN is active
- Replace always-on for permanent

* Fri Feb 26 2021 Proton Technologies AG <opensource@proton.me> 3.4.0-3
- Add support for protonvpn-nm-lib 0.5.0
- Replace os.system for custom subprocess wrapper

* Thu Feb 25 2021 Proton Technologies AG <opensource@proton.me> 3.3.1-1
- Update change for protonvpn-nm-lib 0.4.2

* Tue Feb 02 2021 Proton Technologies AG <opensource@proton.me> 3.3.0-1
- Apply server label if it exists

* Wed Jan 27 2021 Proton Technologies AG <opensource@proton.me> 3.2.1-2
- Update .spec file for public release
openSUSE Build Service is sponsored by