%define majorversion 4.30 %define minorversion 9696 Name: softethervpn Version: %{majorversion}.%{minorversion} Release: 1%{?dist} Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program Group: Applications/Internet License: GPLv2 URL: http://www.softether.org/ Source0: https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v%{majorversion}-%{minorversion}-beta/softether-src-v%{majorversion}-%{minorversion}-beta.tar.gz Patch0: softethervpn-rhel8-patch.diff BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: readline-devel BuildRequires: systemd %description SoftEther VPN is one of the world's most powerful and easy-to-use multi-protocol VPN software. It runs on Windows, Linux, Mac, FreeBSD, and Solaris. %package bridge Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program, bridge variant Requires: softether-common %description bridge SoftEther VPN is one of the world's most powerful and easy-to-use multi-protocol VPN software. It runs on Windows, Linux, Mac, FreeBSD, and Solaris. Contains bridge vpn util. %package server Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program, server part Requires: softether-common %description server SoftEther VPN is one of the world's most powerful and easy-to-use multi-protocol VPN software. It runs on Windows, Linux, Mac, FreeBSD, and Solaris. Contains server part of vpn. %package client Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program, client program Requires: softether-common %description client SoftEther VPN is one of the world's most powerful and easy-to-use multi-protocol VPN software. It runs on Windows, Linux, Mac, FreeBSD, and Solaris. Contains client part of vpn util. %package common Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program, common files including vpncmd util Requires: softether-common %description common SoftEther VPN is one of the world's most powerful and easy-to-use multi-protocol VPN software. It runs on Windows, Linux, Mac, FreeBSD, and Solaris. Contains common files including vpncmd util %prep %setup -q -n v%{majorversion}-%{minorversion} %patch0 -p1 %build %configure # fix hardcoded paths in Makefile fixbins="bridge server client cmd" for str in $fixbins; do dirname=${str^^} echo INSTALL_VPN${dirname}_DIR vpn${str} sed "s|echo \$(INSTALL_VPN${dirname}_DIR)vpn${str}|echo %{_usr}/vpn${str}/vpn${str}|g" -i %{_builddir}/v%{majorversion}-%{minorversion}/Makefile done # fix hardcoded paths in systemd unit files for unit in $(ls -1 %{_builddir}/v%{majorversion}-%{minorversion}/systemd/*.service); do sed "s|/opt|%{_usr}|" -i %{_builddir}/v%{majorversion}-%{minorversion}/systemd/$(basename $unit) done make %{?_smp_mflags} %install install -m 755 -d %{buildroot}/%{_usr}/bin/ install -m 755 -d %{buildroot}/%{_unitdir} make \ INSTALL_BINDIR=%{buildroot}/%{_usr}/bin/ \ INSTALL_VPNBRIDGE_DIR=%{buildroot}/%{_usr}/vpnbridge/ \ INSTALL_VPNSERVER_DIR=%{buildroot}/%{_usr}/vpnserver/ \ INSTALL_VPNCLIENT_DIR=%{buildroot}/%{_usr}/vpnclient/ \ INSTALL_VPNCMD_DIR=%{buildroot}/%{_usr}/vpncmd/ \ install install -D -m 644 %{_builddir}/v%{majorversion}-%{minorversion}/systemd/softether-vpnbridge.service %{buildroot}/%{_unitdir}/softether-vpnbridge.service install -D -m 644 %{_builddir}/v%{majorversion}-%{minorversion}/systemd/softether-vpnserver.service %{buildroot}/%{_unitdir}/softether-vpnserver.service install -D -m 644 %{_builddir}/v%{majorversion}-%{minorversion}/systemd/softether-vpnclient.service %{buildroot}/%{_unitdir}/softether-vpnclient.service %clean rm -rf $RPM_BUILD_ROOT %files bridge %defattr(-,root,root,-) %{_usr}/bin/vpnbridge %{_usr}/vpnbridge/hamcore.se2 %{_usr}/vpnbridge/vpnbridge %{_unitdir}/softether-vpnbridge.service %files server %defattr(-,root,root,-) %{_usr}/bin/vpnserver %{_usr}/vpnserver/hamcore.se2 %{_usr}/vpnserver/vpnserver %{_unitdir}/softether-vpnserver.service %files client %defattr(-,root,root,-) %{_usr}/bin/vpnclient %{_usr}/vpnclient/hamcore.se2 %{_usr}/vpnclient/vpnclient %{_unitdir}/softether-vpnclient.service %files common %defattr(-,root,root,-) %{_usr}/bin/vpncmd %{_usr}/vpncmd/hamcore.se2 %{_usr}/vpncmd/vpncmd %doc AUTHORS.TXT BUILD_UNIX.TXT BUILD_WINDOWS.TXT ChangeLog ChangeLog.txt LICENSE LICENSE.TXT README README.TXT THIRD_PARTY.TXT WARNING.TXT %changelog * Wed Jan 29 2014 Dexter Ang - 4.04.9412-2 - Made initscript more Fedora/RH-like. - initscript currently using killall. Need to fix this. * Tue Jan 21 2014 Dexter Ang - Initial release