%global crate gpgui %global crateid com.yuezk.%{crate} Name: globalprotect-openconnect Version: 2.4.5 Release: 1%{?dist} Summary: A GlobalProtect VPN client powered by OpenConnect Group: Productivity/Networking/PPP License: GPL-3.0 URL: https://github.com/yuezk/GlobalProtect-openconnect Source: https://github.com/yuezk/GlobalProtect-openconnect/releases/download/v2.4.5/%{name}-%{version}.tar.gz Source1: vendor-%{version}.tar.xz Source2: vendor-config-%{version}.toml Source3: vendor-config-%{version}.lock BuildRequires: cargo-rpm-macros >= 26 BuildRequires: rustc BuildRequires: lld BuildRequires: cargo BuildRequires: just BuildRequires: jq BuildRequires: pkg-config BuildRequires: glib2-devel >= 2.70 BuildRequires: openconnect-devel BuildRequires: openssl-devel BuildRequires: wget BuildRequires: file BuildRequires: perl %if 0%{?rhel} <= 9 BuildRequires: webkit2gtk3-devel %else BuildRequires: webkit2gtk4.1-devel %endif BuildRequires: libappindicator-gtk3-devel BuildRequires: librsvg2-devel Requires: openconnect >= 8.20 Requires: libappindicator-gtk3 Conflicts: globalprotect-openconnect-snapshot %global debug_package %{nil} %description A GUI for GlobalProtect VPN, based on OpenConnect, supports the SSO authentication method. %prep %autosetup -p1 -a1 cat %{SOURCE3} > Cargo.lock %cargo_prep -v vendor # Check if .cargo/config.toml exists if [ -f .cargo/config.toml ]; then # If it exists, append the contents of %%{SOURCE2} to .cargo/config.toml cat %{SOURCE2} >> .cargo/config.toml echo "Appended %{SOURCE2} to .cargo/config.toml" else # If it does not exist, append the contents of %%{SOURCE2} to .cargo/config cat %{SOURCE2} >> .cargo/config echo "Appended %{SOURCE2} to .cargo/config" fi %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} sed 's/\(.*\) (.*#\(.*\))/\1+git\2/' -i cargo-vendor.txt %install %cargo_install %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/%{crate} %{_datadir}/applications/%{crate}.desktop %{_datadir}/icons/hicolor/*/apps/%{crate}.png %{_datadir}/icons/hicolor/scalable/apps/%{crate}.svg %{_datadir}/polkit-1/actions/%{crateid}.policy %{_libdir}/NetworkManager/dispatcher.d/gpclient-nm-hook %{_libdir}/NetworkManager/dispatcher.d/pre-down.d/gpclient.down %changelog * Wed Jul 16 2025 Kevin Yue - 2.4.5 - Bugfix and improvements