Name: ivpn Version: 3.14.17 Release: 1%{?dist} Summary: IVPN - Secure VPN for Privacy (CLI) License: GPL-3.0 URL: https://www.ivpn.net Source0: https://github.com/ivpn/desktop-app/archive/v%{version}.tar.gz#/%{name}-src-v%{version}.tar.gz Source1: ivpn-service.service Source2: ivpn.install BuildRequires: gcc BuildRequires: make BuildRequires: curl BuildRequires: golang >= 1.21 BuildRequires: git BuildRequires: cmake BuildRequires: ninja-build Requires: glibc Requires: lsof Requires: openvpn Recommends: bash-completion %description IVPN is a secure VPN for privacy, offering CLI tools for managing connections. %prep %autosetup -n desktop-app-%{version} %build echo "*** Build Daemon ***" pushd daemon export IVPN_BUILD_SKIP_GLIBC_VER_CHECK=true export IVPN_NO_WIFI=true # Fedora has no wireless-tools arm package export IVPN_BUILD_CAN_SKIP_DOWNLOAD_SERVERS=true ./References/Linux/scripts/build-all.sh -v %{version} -c "%{version}_stamped" popd echo "*** Build CLI ***" pushd cli export IVPN_BUILD_SKIP_GLIBC_VER_CHECK=true export IVPN_NO_WIFI=true # Fedora has no wireless-tools arm package ./References/Linux/compile-cli.sh -v %{version} -c "%{version}_stamped" popd %pre # pre upgrade if [ $1 == 2 ]; then %{Source2} pre_upgrade fi %preun %{Source2} pre_remove %install # Create directories install -d %{buildroot}/usr/bin install -d %{buildroot}/usr/share/bash-completion/completions install -d %{buildroot}/usr/lib/systemd/system install -d %{buildroot}/opt/ivpn install -d %{buildroot}/opt/ivpn/etc install -d %{buildroot}/opt/ivpn/wireguard-tools install -d %{buildroot}/opt/ivpn/obfsproxy install -d %{buildroot}/opt/ivpn/dnscrypt-proxy install -d %{buildroot}/opt/ivpn/kem install -d %{buildroot}/opt/ivpn/v2ray # Install daemon install -Dm755 daemon/References/Linux/scripts/_out_bin/ivpn-service %{buildroot}/usr/bin/ivpn-service # Install CLI install -Dm755 cli/References/Linux/_out_bin/ivpn %{buildroot}/usr/bin/ivpn install -Dm644 cli/References/Linux/_out_bin/ivpn.bash-completion %{buildroot}/usr/share/bash-completion/completions/ivpn # Install configuration and support files install -Dm700 daemon/References/Linux/etc/client.down %{buildroot}/opt/ivpn/etc/client.down install -Dm700 daemon/References/Linux/etc/client.up %{buildroot}/opt/ivpn/etc/client.up install -Dm700 daemon/References/Linux/etc/firewall.sh %{buildroot}/opt/ivpn/etc/firewall.sh install -Dm700 daemon/References/Linux/etc/splittun.sh %{buildroot}/opt/ivpn/etc/splittun.sh install -Dm600 daemon/References/common/etc/servers.json %{buildroot}/opt/ivpn/etc/servers.json install -Dm400 daemon/References/common/etc/ca.crt %{buildroot}/opt/ivpn/etc/ca.crt install -Dm400 daemon/References/common/etc/ta.key %{buildroot}/opt/ivpn/etc/ta.key # WireGuard tools install -Dm755 daemon/References/Linux/_deps/wireguard-tools_inst/wg-quick %{buildroot}/opt/ivpn/wireguard-tools/wg-quick install -Dm755 daemon/References/Linux/_deps/wireguard-tools_inst/wg %{buildroot}/opt/ivpn/wireguard-tools/wg # Obfuscation tools install -Dm755 daemon/References/Linux/_deps/obfs4proxy_inst/obfs4proxy %{buildroot}/opt/ivpn/obfsproxy/obfs4proxy # DNSCrypt Proxy install -Dm755 daemon/References/Linux/_deps/dnscryptproxy_inst/dnscrypt-proxy %{buildroot}/opt/ivpn/dnscrypt-proxy/dnscrypt-proxy install -Dm400 daemon/References/common/etc/dnscrypt-proxy-template.toml %{buildroot}/opt/ivpn/etc/dnscrypt-proxy-template.toml # Other dependencies install -Dm755 daemon/References/Linux/_deps/kem-helper/kem-helper-bin/kem-helper %{buildroot}/opt/ivpn/kem/kem-helper install -Dm755 daemon/References/Linux/_deps/v2ray_inst/v2ray %{buildroot}/opt/ivpn/v2ray/v2ray # Systemd service file install -Dm644 %{Source1} %{buildroot}/usr/lib/systemd/system/ivpn-service.service %post # post install if [ $1 -eq 1 ]; then %{Source2} post_install fi if [ $1 -eq 2 ]; then %{Source2} post_upgrade fi %postun %{Source2} post_remove %files %license LICENSE %doc README.md /usr/bin/ivpn /usr/bin/ivpn-service /usr/share/bash-completion/completions/ivpn /usr/lib/systemd/system/ivpn-service.service /opt/ivpn/etc/* /opt/ivpn/wireguard-tools/* /opt/ivpn/obfsproxy/* /opt/ivpn/dnscrypt-proxy/* /opt/ivpn/kem/* /opt/ivpn/v2ray/* %changelog