%if 0%{?rhel} <= 9 %global debug_package %{nil} %global _enable_debug_packages 0 %endif %define git_name GlobalProtect-openconnect # Third-party SingleApplication %define sapp_commit bdbb09b5f21ebea4cd7dfb43b29114a94e04a3a1 # Third-party Plog %define plog_commit 914e799d2b08d790f5d04d1c46928586b3a41250 Name: globalprotect-openconnect Version: 1.4.9 Release: 1%{?dist} Summary: A GlobalProtect VPN client (GUI) based on OpenConnect, supports SAML auth mode License: GPLv3+ Group: Networking/Other URL: https://github.com/yuezk/GlobalProtect-openconnect Source0: https://github.com/yuezk/GlobalProtect-openconnect/archive/v%{version}/%{git_name}-%{version}.tar.gz Source1: https://github.com/itay-grudev/SingleApplication/archive/%{sapp_commit}.tar.gz Source2: https://github.com/SergiusTheBest/plog/archive/%{plog_commit}.tar.gz BuildRequires: cmake BuildRequires: cmake(Qt5Keychain) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5WebEngineWidgets) BuildRequires: pkgconfig(Qt5WebSockets) BuildRequires: systemd-rpm-macros Requires: openconnect >= 8.0.0 Provides: globalprotect-openconnect = %{version}-%{release} Provides: bundled(singleapplication) = 3.3.0 Provides: bundled(plog) = 1.1.9 %description A GlobalProtect VPN client (GUI) for Linux based on Openconnect and built with Qt5, supports SAML auth mode, inspired by gp-saml-gui. Features: ========= * Similar user experience as the official client in macOS. * Supports both SAML and non-SAML authentication modes. * Supports automatically selecting the preferred gateway from the multiple gateways. * Supports switching gateway from the system tray menu manually. %prep %setup -q -n %{git_name}-%{version} -a1 -a2 %autopatch -p1 # prepare SingleApplication Third-party mv SingleApplication-%{sapp_commit}/* 3rdparty/SingleApplication/ rm -rf SingleApplication-%{sapp_commit}/ # prepare Plog Third-party mv plog-%{plog_commit}/* 3rdparty/plog/ rm -rf plog-%{plog_commit}/ %build %cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE=-s %cmake_build %install %cmake_install %post %systemd_post gpservice.service %preun systemd_preun gpservice.service %postun %systemd_postun_with_restart gpservice.service %files %doc README.md %license LICENSE %dir %{_sysconfdir}/gpservice %{_sysconfdir}/gpservice/gp.conf %{_bindir}/gpclient %{_bindir}/gpservice %{_datadir}/applications/com.yuezk.qt.gpclient.desktop %{_datadir}/dbus-1/system-services/com.yuezk.qt.GPService.service %{_datadir}/dbus-1/system.d/com.yuezk.qt.GPService.conf %{_datadir}/icons/hicolor/scalable/apps/com.yuezk.qt.gpclient.svg %{_unitdir}/gpservice.service %{_datadir}/metainfo/com.yuezk.qt.gpclient.metainfo.xml %changelog * Sun Aug 24 2025 Jean-Marc Liger - 1.4.9-1 - Import Third-party from Mageia