1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-25 19:09:52 +03:00
SoftEtherVPN/centos/SPECS/softethervpn.spec

136 lines
4.6 KiB
RPMSpec
Raw Normal View History

%define majorversion 4
%define minorversion 22
%define buildversion 9634
%define dateversion 2016.11.27
2015-10-07 18:44:08 +03:00
%define buildrelease beta
2014-02-18 02:20:37 +04:00
Name: softethervpn
2015-09-30 18:52:20 +03:00
Version: %{majorversion}.%{minorversion}.%{buildversion}
Release: 2%{?dist}
2014-02-18 02:20:37 +04:00
Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program
Group: Applications/Internet
License: GPLv2
URL: http://www.softether.org/
Source0: http://www.softether-download.com/files/softether/v%{majorversion}.%{minorversion}-%{buildversion}-%{buildrelease}-%{dateversion}-tree/Source_Code/softether-src-v%{majorversion}.%{minorversion}-%{buildversion}-%{buildrelease}.tar.gz
2014-02-18 02:20:37 +04:00
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: readline-devel
2014-02-18 02:20:37 +04:00
%if 0%{?el6}%{?el5}
Requires(post) : /sbin/chkconfig
Requires(preun) : /sbin/chkconfig
Requires(preun) : /sbin/service
%endif
%if 0%{?rhel} >= 7
Requires(post) : systemd
Requires(preun) : systemd
%endif
2014-02-18 02:20:37 +04:00
%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.
%prep
2015-09-30 18:52:20 +03:00
%setup -q -n v%{majorversion}.%{minorversion}-%{buildversion}
2014-02-18 02:20:37 +04:00
%build
%ifarch i386 i686
cp %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/linux_32bit.mak Makefile
2014-02-18 02:20:37 +04:00
%else
cp %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/linux_64bit.mak Makefile
2014-02-18 02:20:37 +04:00
%endif
make
%install
#rm -rf $RPM_BUILD_ROOT
%make_install
install -m 755 -d %{buildroot}/usr/bin/
install -m 755 -d %{buildroot}%{_initrddir}
install -m 755 -d %{buildroot}%{_unitdir}
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/scripts/vpnserver %{buildroot}/usr/bin/vpnserver
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/scripts/vpnbridge %{buildroot}/usr/bin/vpnbridge
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/scripts/vpnclient %{buildroot}/usr/bin/vpnclient
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/scripts/vpncmd %{buildroot}/usr/bin/vpncmd
%if 0%{?el6}%{?el5}
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/init.d/vpnserver %{buildroot}%{_initrddir}/vpnserver
%endif
%if 0%{?el7}%{?fedora}
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/systemd/softether-vpnbridge.service %{buildroot}%{_unitdir}/softether-vpnbridge.service
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/systemd/softether-vpnclient.service %{buildroot}%{_unitdir}/softether-vpnclient.service
install -m 755 %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/systemd/softether-vpnserver.service %{buildroot}%{_unitdir}/softether-vpnserver.service
%endif
2014-02-18 02:20:37 +04:00
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_usr}/bin/vpnserver
%{_usr}/bin/vpnbridge
%{_usr}/bin/vpnclient
%{_usr}/bin/vpncmd
%{_usr}/vpnserver/hamcore.se2
%{_usr}/vpnserver/vpnserver
%{_usr}/vpnbridge/hamcore.se2
%{_usr}/vpnbridge/vpnbridge
%{_usr}/vpnclient/hamcore.se2
%{_usr}/vpnclient/vpnclient
%{_usr}/vpncmd/hamcore.se2
%{_usr}/vpncmd/vpncmd
%{_usr}/vpnserver/
%{_usr}/vpnbridge/
%{_usr}/vpnclient/
%{_usr}/vpncmd/
%if 0%{?el6}%{?el5}
2014-02-18 02:20:37 +04:00
%{_initddir}/vpnserver
%endif
%if 0%{?el7}%{?fedora}
%{_unitdir}/*
%endif
2014-02-18 02:20:37 +04:00
%doc AUTHORS.TXT BUILD_UNIX.TXT BUILD_WINDOWS.TXT ChangeLog ChangeLog.txt LICENSE LICENSE.TXT README README.TXT THIRD_PARTY.TXT WARNING.TXT
2014-02-18 02:20:37 +04:00
%post
%if 0%{?el6}%{?el5}
2014-02-18 02:20:37 +04:00
/sbin/chkconfig --add vpnserver
%endif
%if 0%{?el7}%{?fedora}
%systemd_post urbackup-server.service
%endif
2014-02-18 02:20:37 +04:00
#%postun
#if [ "$1" -ge "1" ]; then
# /sbin/service vpnserver condrestart >/dev/null 2>&1 || :
2014-02-18 02:20:37 +04:00
#fi
%preun
%if 0%{?el6}%{?el5}
if [ $1 -eq 0 ]
then
/sbin/service vpnserver stop >/dev/null 2>&1
/sbin/chkconfig --del vpnserver
2014-02-18 02:20:37 +04:00
fi
%endif
%if 0%{?el7}%{?fedora}
%systemd_preun vpnserver.service
%endif
2014-02-18 02:20:37 +04:00
%changelog
* Tue Feb 14 2017 Oleg Zaitsev <me@ozaitsev.ru> - 4.22.9634-1
- Update upstream to 4.22.9634-beta
- More macrofication
- spec modified for building for several releases (i.e. EL5, EL6, Fedora)
2015-10-07 18:44:08 +03:00
* Wed Sep 30 2015 Jeff Tang <mrjefftang@gmail.com> - 4.19.9582-1
- Update upstream to 4.19.9582-beta
2015-09-30 18:52:20 +03:00
* Wed Sep 30 2015 Jeff Tang <mrjefftang@gmail.com> - 4.19.9577-1
- Update upstream to 4.19.9577
2014-02-18 02:20:37 +04:00
* Wed Jan 29 2014 Dexter Ang <thepoch@gmail.com> - 4.04.9412-2
- Made initscript more Fedora/RH-like.
- initscript currently using killall. Need to fix this.
* Tue Jan 21 2014 Dexter Ang <thepoch@gmail.com>
- Initial release