1 |
%define majorversion 4 |
2 |
%define minorversion 19 |
3 |
%define buildversion 9582 |
4 |
%define dateversion 2015.10.06 |
5 |
%define buildrelease beta |
6 |
|
7 |
Name: softethervpn |
8 |
Version: %{majorversion}.%{minorversion}.%{buildversion} |
9 |
Release: 1%{?dist} |
10 |
Summary: An Open-Source Free Cross-platform Multi-protocol VPN Program |
11 |
|
12 |
Group: Applications/Internet |
13 |
License: GPLv2 |
14 |
URL: http://www.softether.org/ |
15 |
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 |
16 |
|
17 |
BuildRequires: ncurses-devel |
18 |
BuildRequires: openssl-devel |
19 |
BuildRequires: readline-devel |
20 |
|
21 |
Requires(post): chkconfig |
22 |
Requires(postun): initscripts |
23 |
Requires(preun): chkconfig |
24 |
Requires(preun): initscripts |
25 |
|
26 |
%description |
27 |
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. |
28 |
|
29 |
%prep |
30 |
%setup -q -n v%{majorversion}.%{minorversion}-%{buildversion} |
31 |
|
32 |
%build |
33 |
%ifarch i386 i686 |
34 |
cp $RPM_SOURCE_DIR/linux_32bit.mak Makefile |
35 |
%else |
36 |
cp $RPM_SOURCE_DIR/linux_64bit.mak Makefile |
37 |
%endif |
38 |
make |
39 |
|
40 |
%install |
41 |
rm -rf $RPM_BUILD_ROOT |
42 |
make install DESTDIR=$RPM_BUILD_ROOT |
43 |
install -m 755 -d $RPM_BUILD_ROOT/usr/bin/ |
44 |
install -m 755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
45 |
install -m 755 $RPM_SOURCE_DIR/scripts/vpnserver $RPM_BUILD_ROOT/usr/bin/vpnserver |
46 |
install -m 755 $RPM_SOURCE_DIR/scripts/vpnbridge $RPM_BUILD_ROOT/usr/bin/vpnbridge |
47 |
install -m 755 $RPM_SOURCE_DIR/scripts/vpnclient $RPM_BUILD_ROOT/usr/bin/vpnclient |
48 |
install -m 755 $RPM_SOURCE_DIR/scripts/vpncmd $RPM_BUILD_ROOT/usr/bin/vpncmd |
49 |
install -m 755 $RPM_SOURCE_DIR/init.d/vpnserver $RPM_BUILD_ROOT/etc/rc.d/init.d/vpnserver |
50 |
|
51 |
%clean |
52 |
rm -rf $RPM_BUILD_ROOT |
53 |
|
54 |
%files |
55 |
%defattr(-,root,root,-) |
56 |
%{_usr}/bin/vpnserver |
57 |
%{_usr}/bin/vpnbridge |
58 |
%{_usr}/bin/vpnclient |
59 |
%{_usr}/bin/vpncmd |
60 |
%{_usr}/vpnserver/hamcore.se2 |
61 |
%{_usr}/vpnserver/vpnserver |
62 |
%{_usr}/vpnbridge/hamcore.se2 |
63 |
%{_usr}/vpnbridge/vpnbridge |
64 |
%{_usr}/vpnclient/hamcore.se2 |
65 |
%{_usr}/vpnclient/vpnclient |
66 |
%{_usr}/vpncmd/hamcore.se2 |
67 |
%{_usr}/vpncmd/vpncmd |
68 |
%{_usr}/vpnserver/ |
69 |
%{_usr}/vpnbridge/ |
70 |
%{_usr}/vpnclient/ |
71 |
%{_usr}/vpncmd/ |
72 |
%{_initddir}/vpnserver |
73 |
%doc AUTHORS.TXT BUILD_UNIX.TXT BUILD_WINDOWS.TXT ChangeLog ChangeLog.txt LICENSE LICENSE.TXT README README.TXT THIRD_PARTY.TXT WARNING.TXT |
74 |
|
75 |
%post |
76 |
/sbin/chkconfig --add vpnserver |
77 |
|
78 |
#%postun |
79 |
#if [ "$1" -ge "1" ]; then |
80 |
# /sbin/service vpnserver condrestart >/dev/null 2>&1 || : |
81 |
#fi |
82 |
|
83 |
%preun |
84 |
if [ $1 -eq 0 ]; then |
85 |
/sbin/service vpnserver stop >/dev/null 2>&1 |
86 |
/sbin/chkconfig --del vpnserver |
87 |
fi |
88 |
|
89 |
%changelog |
90 |
* Wed Sep 30 2015 Jeff Tang <mrjefftang@gmail.com> - 4.19.9582-1 |
91 |
- Update upstream to 4.19.9582-beta |
92 |
|
93 |
* Wed Sep 30 2015 Jeff Tang <mrjefftang@gmail.com> - 4.19.9577-1 |
94 |
- Update upstream to 4.19.9577 |
95 |
|
96 |
* Wed Jan 29 2014 Dexter Ang <thepoch@gmail.com> - 4.04.9412-2 |
97 |
- Made initscript more Fedora/RH-like. |
98 |
- initscript currently using killall. Need to fix this. |
99 |
|
100 |
* Tue Jan 21 2014 Dexter Ang <thepoch@gmail.com> |
101 |
- Initial release |
102 |
|