mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 10:59:53 +03:00
Update softethervpn.spec
Update upstream to 4.22.9634-beta. spec modified for building for several releases (i.e. EL5, EL6, Fedora)
This commit is contained in:
parent
4df2eb4f9c
commit
e9d5b4ebcf
@ -1,7 +1,4 @@
|
||||
%define majorversion 4
|
||||
%define minorversion 19
|
||||
%define buildversion 9582
|
||||
%define dateversion 2015.10.06
|
||||
%define dateversion 2016.11.27
|
||||
%define buildrelease beta
|
||||
|
||||
Name: softethervpn
|
||||
@ -12,16 +9,22 @@ 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
|
||||
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
|
||||
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: readline-devel
|
||||
|
||||
Requires(post): chkconfig
|
||||
Requires(postun): initscripts
|
||||
Requires(preun): chkconfig
|
||||
Requires(preun): initscripts
|
||||
%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
|
||||
|
||||
%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.
|
||||
@ -31,23 +34,30 @@ SoftEther VPN is one of the world's most powerful and easy-to-use multi-protocol
|
||||
|
||||
%build
|
||||
%ifarch i386 i686
|
||||
cp $RPM_SOURCE_DIR/linux_32bit.mak Makefile
|
||||
cp %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/linux_32bit.mak Makefile
|
||||
%else
|
||||
cp $RPM_SOURCE_DIR/linux_64bit.mak Makefile
|
||||
cp %{_builddir}/v%{majorversion}.%{minorversion}-%{buildversion}/centos/SOURCES/linux_64bit.mak Makefile
|
||||
%endif
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -m 755 -d $RPM_BUILD_ROOT/usr/bin/
|
||||
install -m 755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
install -m 755 $RPM_SOURCE_DIR/scripts/vpnserver $RPM_BUILD_ROOT/usr/bin/vpnserver
|
||||
install -m 755 $RPM_SOURCE_DIR/scripts/vpnbridge $RPM_BUILD_ROOT/usr/bin/vpnbridge
|
||||
install -m 755 $RPM_SOURCE_DIR/scripts/vpnclient $RPM_BUILD_ROOT/usr/bin/vpnclient
|
||||
install -m 755 $RPM_SOURCE_DIR/scripts/vpncmd $RPM_BUILD_ROOT/usr/bin/vpncmd
|
||||
install -m 755 $RPM_SOURCE_DIR/init.d/vpnserver $RPM_BUILD_ROOT/etc/rc.d/init.d/vpnserver
|
||||
|
||||
#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
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
@ -69,24 +79,46 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_usr}/vpnbridge/
|
||||
%{_usr}/vpnclient/
|
||||
%{_usr}/vpncmd/
|
||||
%if 0%{?el6}%{?el5}
|
||||
%{_initddir}/vpnserver
|
||||
%doc AUTHORS.TXT BUILD_UNIX.TXT BUILD_WINDOWS.TXT ChangeLog ChangeLog.txt LICENSE LICENSE.TXT README README.TXT THIRD_PARTY.TXT WARNING.TXT
|
||||
%endif
|
||||
%if 0%{?el7}%{?fedora}
|
||||
%{_unitdir}/*
|
||||
%endif
|
||||
|
||||
%doc AUTHORS.TXT BUILD_UNIX.TXT BUILD_WINDOWS.TXT ChangeLog ChangeLog.txt LICENSE LICENSE.TXT README README.TXT THIRD_PARTY.TXT WARNING.TXT
|
||||
%post
|
||||
%if 0%{?el6}%{?el5}
|
||||
/sbin/chkconfig --add vpnserver
|
||||
%endif
|
||||
%if 0%{?el7}%{?fedora}
|
||||
%systemd_post urbackup-server.service
|
||||
%endif
|
||||
|
||||
#%postun
|
||||
#if [ "$1" -ge "1" ]; then
|
||||
# /sbin/service vpnserver condrestart >/dev/null 2>&1 || :
|
||||
# /sbin/service vpnserver condrestart >/dev/null 2>&1 || :
|
||||
#fi
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service vpnserver stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del vpnserver
|
||||
%if 0%{?el6}%{?el5}
|
||||
if [ $1 -eq 0 ]
|
||||
then
|
||||
/sbin/service vpnserver stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del vpnserver
|
||||
fi
|
||||
%endif
|
||||
%if 0%{?el7}%{?fedora}
|
||||
%systemd_preun vpnserver.service
|
||||
%endif
|
||||
|
||||
|
||||
%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)
|
||||
|
||||
* Wed Sep 30 2015 Jeff Tang <mrjefftang@gmail.com> - 4.19.9582-1
|
||||
- Update upstream to 4.19.9582-beta
|
||||
|
||||
@ -99,4 +131,3 @@ fi
|
||||
|
||||
* Tue Jan 21 2014 Dexter Ang <thepoch@gmail.com>
|
||||
- Initial release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user