## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global upstream_version 4.44-9807-rtm %global majmin %( echo "%upstream_version" | cut -d"-" -f 1 ) %global patchver %( echo "%upstream_version" | cut -d"-" -f 2 ) %global console_version 1.0.0 %global console_source_dir softethervpn-console-%{console_version} %global console_url_path /admin/default/ %global console_path src/bin/hamcore/wwwroot%{console_url_path} # The web console is not built by default. Build with `--with console` to # compile it offline from Source4/Source5 and embed it in hamcore. %bcond_with console Name: softethervpn4 Version: %{majmin}.%{patchver} Release: %autorelease Summary: SoftEther VPN 4 compatibility package License: Apache-2.0 AND BSD-3-Clause AND ISC URL: https://www.softether.org Source0: https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/archive/refs/tags/v%{upstream_version}.tar.gz#/%{name}-%{version}.tar.gz Source1: softether-vpnserver.service Source2: softether-vpnclient.service Source3: softether-vpnbridge.service %if %{with console} Source4: https://github.com/Leuca/softethervpn-console/archive/v%{console_version}/%{console_source_dir}.tar.gz Source5: %{console_source_dir}-npm-cache.tar.gz %endif # Backport SoftEtherVPN 5's split config, log, and PID paths. Patch0: softethervpn4-paths.patch # Use Fedora's zlib instead of the bundled 1.2.11 headers. Patch1: softethervpn4-system-zlib.patch # OpenSSL 3.5 no longer provides the unused ENGINE header. Patch2: softethervpn4-openssl-no-engine.patch # Backports from the SoftEtherVPN 5 package. Patch3: softethervpn4-fix-pointer-key-hashing.patch Patch4: softethervpn4-fix-cluster-ip-table-delete.patch Patch5: softethervpn4-fix-cluster-session-list.patch # Match PKCS#11 handle widths on 64-bit architectures. Patch6: softethervpn4-pkcs11-types.patch # Fix declarations rejected by GCC 15. Patch7: softethervpn4-gcc15.patch BuildRequires: gcc BuildRequires: make BuildRequires: ncurses-devel %if 0%{?fedora} > 44 BuildRequires: openssl3-devel %else BuildRequires: openssl-devel %endif BuildRequires: patch BuildRequires: readline-devel BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel %if %{with console} BuildRequires: nodejs BuildRequires: nodejs-devel BuildRequires: nodejs-npm %endif Requires: softether4-vpncmd%{?_isa} = %{version}-%{release} Requires: softether4-vpnserver%{?_isa} = %{version}-%{release} Requires: softether4-vpnclient%{?_isa} = %{version}-%{release} Requires: softether4-vpnbridge%{?_isa} = %{version}-%{release} Conflicts: softethervpn %description SoftEther VPN 4 is the stable branch of the cross-platform, multi-protocol VPN software. It supports SSL-VPN, OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3, and EtherIP. %package -n softether4-vpncmd Summary: Command-line administration utility for SoftEther VPN Conflicts: softether-vpncmd Provides: bundled(intel-aesni) Provides: bundled(libsodium) %description -n softether4-vpncmd Command-line utility for administering SoftEther VPN servers, bridges, and clients. %package -n softether4-vpnserver Summary: SoftEther VPN server Conflicts: softether-vpnserver Provides: bundled(intel-aesni) Provides: bundled(libsodium) %description -n softether4-vpnserver Server daemon for SoftEther VPN. %package -n softether4-vpnclient Summary: SoftEther VPN client Conflicts: softether-vpnclient Provides: bundled(intel-aesni) Provides: bundled(libsodium) %description -n softether4-vpnclient Client daemon for SoftEther VPN. %package -n softether4-vpnbridge Summary: SoftEther VPN bridge Conflicts: softether-vpnbridge Provides: bundled(intel-aesni) Provides: bundled(libsodium) %description -n softether4-vpnbridge Bridge daemon for SoftEther VPN. %prep %setup -q -n SoftEtherVPN_Stable-%{upstream_version} %autopatch -p1 rm -rf src/Mayaqua/zlib %if %{with console} tar -xzf %{SOURCE4} tar -xzf %{SOURCE5} %endif %build %if %{with console} pushd %{console_source_dir} npm ci --offline --cache ../npm-cache --include=dev --ignore-scripts --no-audit --fund=false ASSET_PATH=%{console_url_path} npm run build:integrated popd mkdir -p %{console_path} cp -r %{console_source_dir}/dist/. %{console_path} %endif cp src/makefiles/linux_%{__isa_bits}bit_nobits.mak Makefile sed -i 's| src/Mayaqua/zlib/zconf.h src/Mayaqua/zlib/zlib.h||' Makefile %make_build \ CC='%{build_cc}' \ OPTIONS_COMPILE_RELEASE='%{build_cflags} -std=gnu17 -fsigned-char -DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_%{__isa_bits} -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I./src -I./src/Cedar -I./src/Mayaqua -DSE_DBDIR="\"%{_sysconfdir}/softether\"" -DSE_LOGDIR="\"%{_localstatedir}/log/softether\"" -DSE_PIDDIR="\"%{_rundir}/softether\""' \ OPTIONS_LINK_RELEASE='%{build_ldflags} -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz' %install install -d %{buildroot}%{_bindir} %{buildroot}%{_libexecdir}/softether install -d -m0700 %{buildroot}%{_sysconfdir}/softether install -d -m0755 %{buildroot}%{_localstatedir}/log/softether for component in vpnserver vpnclient vpnbridge vpncmd; do install -Dpm0755 bin/${component}/${component} \ %{buildroot}%{_libexecdir}/softether/${component}/${component} install -Dpm0644 bin/${component}/hamcore.se2 \ %{buildroot}%{_libexecdir}/softether/${component}/hamcore.se2 done printf '#!/bin/sh\nexec %s/softether/vpncmd/vpncmd "$@"\n' \ '%{_libexecdir}' > %{buildroot}%{_bindir}/vpncmd chmod 0755 %{buildroot}%{_bindir}/vpncmd install -Dpm0644 %{SOURCE1} %{buildroot}%{_unitdir}/softether-vpnserver.service install -Dpm0644 %{SOURCE2} %{buildroot}%{_unitdir}/softether-vpnclient.service install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/softether-vpnbridge.service %check for component in vpnserver vpnclient vpnbridge vpncmd; do test -x bin/${component}/${component} test -s bin/${component}/hamcore.se2 done for component in vpnserver vpnclient vpnbridge; do test ! -e %{buildroot}%{_bindir}/${component} done %post -n softether4-vpnserver %systemd_post softether-vpnserver.service %preun -n softether4-vpnserver %systemd_preun softether-vpnserver.service %postun -n softether4-vpnserver %systemd_postun_with_restart softether-vpnserver.service %post -n softether4-vpnclient %systemd_post softether-vpnclient.service %preun -n softether4-vpnclient %systemd_preun softether-vpnclient.service %postun -n softether4-vpnclient %systemd_postun_with_restart softether-vpnclient.service %post -n softether4-vpnbridge %systemd_post softether-vpnbridge.service %preun -n softether4-vpnbridge %systemd_preun softether-vpnbridge.service %postun -n softether4-vpnbridge %systemd_postun_with_restart softether-vpnbridge.service %files %license LICENSE %doc AUTHORS.TXT BUILD_UNIX.TXT ChangeLog README THIRD_PARTY.TXT WARNING.TXT %files -n softether4-vpncmd %license LICENSE %doc README %{_bindir}/vpncmd %dir %{_libexecdir}/softether %dir %{_libexecdir}/softether/vpncmd %{_libexecdir}/softether/vpncmd/vpncmd %{_libexecdir}/softether/vpncmd/hamcore.se2 %files -n softether4-vpnserver %license LICENSE %doc README %dir %{_libexecdir}/softether %dir %{_libexecdir}/softether/vpnserver %{_libexecdir}/softether/vpnserver/vpnserver %{_libexecdir}/softether/vpnserver/hamcore.se2 %{_unitdir}/softether-vpnserver.service %attr(0700,root,root) %dir %{_sysconfdir}/softether %dir %{_localstatedir}/log/softether %files -n softether4-vpnclient %license LICENSE %doc README %dir %{_libexecdir}/softether %dir %{_libexecdir}/softether/vpnclient %{_libexecdir}/softether/vpnclient/vpnclient %{_libexecdir}/softether/vpnclient/hamcore.se2 %{_unitdir}/softether-vpnclient.service %attr(0700,root,root) %dir %{_sysconfdir}/softether %dir %{_localstatedir}/log/softether %files -n softether4-vpnbridge %license LICENSE %doc README %dir %{_libexecdir}/softether %dir %{_libexecdir}/softether/vpnbridge %{_libexecdir}/softether/vpnbridge/vpnbridge %{_libexecdir}/softether/vpnbridge/hamcore.se2 %{_unitdir}/softether-vpnbridge.service %attr(0700,root,root) %dir %{_sysconfdir}/softether %dir %{_localstatedir}/log/softether %changelog ## START: Generated by rpmautospec * Sun Aug 23 2026 Luca Magrone - 4.44.9807-1 - Initial package for version 4.44-9807-rtm ## END: Generated by rpmautospec