Projects
OVPN-beta
ovpn
ovpn.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ovpn.spec of Package ovpn (Revision 14)
Currently displaying revision
14
,
Show latest
%global debug_package %{nil} #----------------------------------------------------------------------------- # # ╔═══╗╔╗──╔╗╔═══╗╔═╗─╔╗ # ║╔═╗║║╚╗╔╝║║╔═╗║║║╚╗║║ # ║║─║║╚╗║║╔╝║╚═╝║║╔╗╚╝║ # ║║─║║─║╚╝║─║╔══╝║║╚╗║║ # ║╚═╝║─╚╗╔╝─║║───║║─║║║ # ╚═══╝──╚╝──╚╝───╚╝─╚═╝ # # ╔══╗─────────────────╔╗─╔╗ ─────────╔╗──╔╗──────────── # ║╔╗║─────────────────║║─║║ ────────╔╝╚╗╔╝╚╗─────────── # ║╚╝║╔═╗╔╗╔╗╔╗╔══╗╔══╗║╚═╝║ ╔╗╔╗╔══╗╚╗╔╝╚╗╔╝╔══╗╔═╗╔══╗ # ║╔═╝║╔╝─╣║╚╝║║╔╗║║╔═╝╚═╗╔╝ ║╚╝║║╔╗║─║║──║║─║║═╣║╔╝║══╣ # ║║──║║─║║╚╗╔╝║╔╗║║╚═╗╔═╝║─ ║║║║║╔╗║─║╚╗─║╚╗║║═╣║║──══║ # ╚╝──╚╝─╚╝─╚╝─╚╝╚╝╚══╝╚══╝─ ╚╩╩╝╚╝╚╝─╚═╝─╚═╝╚══╝╚╝─╚══╝ # # Maintainer: Roman Kutashenko <roman.kutashenko@ovpn.com> # #----------------------------------------------------------------------------- # ---------------------------------------------------------------------------- # General info # ---------------------------------------------------------------------------- Summary: OVPN Name: ovpn Version: 2.4.0 Release: 5281 Group: VPN License: BSD-3-Clause URL: https://ovpn.com/ # ---------------------------------------------------------------------------- # Sources # ---------------------------------------------------------------------------- Source0: %{name}_%{version}.orig.tar.gz # ---------------------------------------------------------------------------- # Build reuirements Fedora 35 # ---------------------------------------------------------------------------- %if 0%{?fedora} >= 35 BuildRequires: dbus-glib-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtquickcontrols2-devel BuildRequires: qt5-qtsvg-devel BuildRequires: qt5-linguist BuildRequires: qt5-qtwebsockets-devel %endif # ---------------------------------------------------------------------------- # Build reuirements OpenSUSE Tumbleweed # ---------------------------------------------------------------------------- %if 0%{?suse_version} > 1500 BuildRequires: libopenssl-1_1-devel BuildRequires: dbus-1-glib-devel BuildRequires: libqt5-qtbase-devel BuildRequires: libqt5-qtquickcontrols2-private-headers-devel BuildRequires: libqt5-qtsvg-devel BuildRequires: libqt5-linguist-devel BuildRequires: libqt5-qtwebsockets-devel BuildRequires: -post-build-checks %endif # ---------------------------------------------------------------------------- # Build reuirements Common # ---------------------------------------------------------------------------- BuildRequires: python BuildRequires: glib2-devel BuildRequires: polkit-devel BuildRequires: libsecret-devel # ---------------------------------------------------------------------------- # Extra reuirements OpenSUSE Tumbleweed # ---------------------------------------------------------------------------- %if 0%{?suse_version} > 1500 Requires: libcap-progs Requires: systemd Requires: openresolv %endif # ---------------------------------------------------------------------------- # Extra reuirements Common # ---------------------------------------------------------------------------- Requires: xterm Requires: wireguard-tools # ---------------------------------------------------------------------------- # App description # ---------------------------------------------------------------------------- %description OVPN app # ---------------------------------------------------------------------------- # Initial setup # ---------------------------------------------------------------------------- %prep %setup -q -n %{name}-%{version} # ---------------------------------------------------------------------------- # Build process # ---------------------------------------------------------------------------- %build # Build Qt project %{__mkdir} build qmake-qt5 -o build/Makefile src/ovpnClient.pro -spec linux-g++ OBS_BUILD=1 CONFIG+=qtquickcompiler DEFINES+="OVPN_LINUX_PACKAGE=1" DEFINES+=SENTRY_URL='\\\"https://9e344c54b8464cb38174056ff057cab2@o436039.ingest.sentry.io/5396380\\\"' %make_build -C build # ---------------------------------------------------------------------------- # Installation # ---------------------------------------------------------------------------- %install # Prepare directories install -d %{buildroot}/opt/OVPN install -d %{buildroot}/opt/OVPN/vpn-controller install -d %{buildroot}/opt/OVPN/vpn-controller/dns-controller install -d %{buildroot}/opt/OVPN/vpn-controller/killswitch install -d %{buildroot}/opt/OVPN/vpn-controller/wg-controller install -d %{buildroot}/etc/dbus-1/system.d install -d %{buildroot}/usr/share/polkit-1/actions install -d %{buildroot}/usr/share/dbus-1/system-services install -d %{buildroot}/etc/network/if-up.d install -d %{buildroot}/etc/network/if-post-down.d install -d %{buildroot}%{_datadir}/applications install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps # Install components install -p -m 755 build/client/OVPN %{buildroot}/opt/OVPN/OVPN.bin install -p -m 755 build/ovpn-daemon/ovpn-daemon %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/openvpn %{buildroot}/opt/OVPN/ install -p -m 500 bin/linux/check-updates.sh %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/install-update.sh %{buildroot}/opt/OVPN/ install -p -m 644 bin/linux/ovpn.service %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/ovpnd %{buildroot}/opt/OVPN/ install -p -m 755 ext/linux/prebuilt/wireguard/usr/bin/wg %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/wireguard-go %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/wg-quick-base %{buildroot}/opt/OVPN/ install -p -m 500 bin/linux/update-resolv-conf.sh %{buildroot}/opt/OVPN/ install -p -m 500 bin/linux/launch-on-startup-create.sh %{buildroot}/opt/OVPN/ install -p -m 500 bin/linux/launch-on-startup-delete.sh %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/OpenSSL-libs/libcrypto.so.1.1 %{buildroot}/opt/OVPN/ install -p -m 755 bin/linux/OpenSSL-libs/libssl.so.1.1 %{buildroot}/opt/OVPN/ install -p -m 755 ext/ovpn-sdk/current/vpn-controller/dns-controller/dns-controller %{buildroot}/opt/OVPN/vpn-controller/dns-controller/ install -p -m 755 ext/ovpn-sdk/current/vpn-controller/dns-controller/dns-worker.sh %{buildroot}/opt/OVPN/vpn-controller/dns-controller/ install -p -m 755 ext/ovpn-sdk/current/vpn-controller/killswitch/killswitch.sh %{buildroot}/opt/OVPN/vpn-controller/killswitch/ install -p -m 755 ext/ovpn-sdk/current/vpn-controller/wg-controller/wg-controller %{buildroot}/opt/OVPN/vpn-controller/wg-controller/ install -p -m 644 bin/linux/se.ovpn.Daemon.conf %{buildroot}/etc/dbus-1/system.d/ install -p -m 644 bin/linux/ovpn.policy %{buildroot}/usr/share/polkit-1/actions/ install -p -m 644 bin/linux/se.ovpn.Daemon.service %{buildroot}/usr/share/dbus-1/system-services/ install -p -m 500 bin/linux/ovpn-if-up-hook %{buildroot}/etc/network/if-up.d/ install -p -m 500 bin/linux/ovpn-if-down-hook %{buildroot}/etc/network/if-post-down.d/ install -p -m 644 scripts/packages/rpm/ovpn.desktop %{buildroot}%{_datadir}/applications/ install -p -m 644 scripts/packages/rpm/ovpn.png %{buildroot}%{_datadir}/icons/hicolor/scalable/apps # ---------------------------------------------------------------------------- # Installation locations # ---------------------------------------------------------------------------- %files /opt/OVPN /etc/dbus-1/system.d /usr/share/polkit-1/actions /usr/share/dbus-1/system-services /etc/network/if-up.d /etc/network/if-post-down.d %{_datadir}/applications %{_datadir}/icons/hicolor/scalable/apps /etc/network /usr/share/icons/hicolor/scalable # ---------------------------------------------------------------------------- # Pre-installation script # ---------------------------------------------------------------------------- %pre systemctl stop ovpn || true systemctl disable ovpn || true # ---------------------------------------------------------------------------- # Post-installation script # ---------------------------------------------------------------------------- %post # Create App wrapper echo '#!/usr/bin/env bash' > /opt/OVPN/OVPN echo 'PID=$(pgrep ovpn-daemon)' >> /opt/OVPN/OVPN echo 'if [ "$?" -eq "0" ]; then' >> /opt/OVPN/OVPN echo ' echo "OVPN Service is running"' >> /opt/OVPN/OVPN echo 'else' >> /opt/OVPN/OVPN echo ' echo "Start OVPN Servise"' >> /opt/OVPN/OVPN echo ' systemctl enable --now /opt/OVPN/ovpn.service' >> /opt/OVPN/OVPN echo 'fi' >> /opt/OVPN/OVPN echo 'QT_QPA_PLATFORM=xcb /opt/OVPN/OVPN.bin' >> /opt/OVPN/OVPN chmod ugo+x /opt/OVPN/OVPN # Create log folder mkdir -p /var/log/OVPN || true # Add service systemctl enable /opt/OVPN/ovpn.service systemctl start ovpn.service # Add special attributes to allow pings from OVPN (to check hosts) %if 0%{?is_opensuse} /sbin/setcap cap_net_raw+ep /opt/OVPN/OVPN %else setcap cap_net_raw+ep /opt/OVPN/OVPN %endif if [ ! -f /usr/bin/ovpn ]; then ln -s /opt/OVPN/OVPN /usr/bin/ovpn fi # ---------------------------------------------------------------------------- # Pre-uninstallation script # ---------------------------------------------------------------------------- %preun PID=$(pgrep OVPN) if [ "$?" -eq "0" ]; then echo "----------------------------------------------------------------------" echo "---------------------------- ERROR -----------------------------------" echo "----------------------------------------------------------------------" echo " At least one instance of "OVPN" found, close it manually please" echo "----------------------------------------------------------------------" exit 127 fi systemctl stop ovpn || true systemctl disable ovpn || true # ---------------------------------------------------------------------------- # Post-uninstallation script # ---------------------------------------------------------------------------- %postun if [ "$1" = 0 ]; then /opt/OVPN/vpn-controller/killswitch/killswitch.sh all disable killswitch 0.0.0.0 0.0.0.0 -1 rm -rf /opt/OVPN rm -f /usr/bin/ovpn fi # ---------------------------------------------------------------------------- # Change log # ---------------------------------------------------------------------------- %changelog * Tue Mar 22 2012 Roman Kutashenko <roman.kutashenko@ovpn.com> 2.1.0 - Added build of RPM packages for Fedora 35+ and OpenSUSE Tumbleweed
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.