1 |
Summary: Virtual tunnel over TCP/IP networks |
2 |
Name: vtun |
3 |
Version: 3.0.2 |
4 |
Release: %mkrel 3 |
5 |
License: GPL |
6 |
Group: Networking/Other |
7 |
URL: http://vtun.sourceforge.net/ |
8 |
Source: %{name}-%{version}.tar.gz |
9 |
Source1: vtund.init.tar.bz2 |
10 |
Obsoletes: vppp |
11 |
Provides: vppp |
12 |
BuildRequires: zlib-devel bison openssl-devel flex |
13 |
Requires(post): rpm-helper |
14 |
Requires(preun): rpm-helper |
15 |
Requires(pre): rpm-helper |
16 |
Requires(postun): rpm-helper |
17 |
#JMD: For static binary |
18 |
BuildRequires: openssl-static-devel, glibc-static-devel |
19 |
|
20 |
%description |
21 |
VTun provides the method for creating Virtual Tunnels over TCP/IP networks |
22 |
and allows to shape, compress, encrypt traffic in that tunnels. |
23 |
Supported type of tunnels are: PPP, IP, Ethernet and most of other serial |
24 |
protocols and programs. |
25 |
|
26 |
VTun is easily and highly configurable, it can be used for various network |
27 |
tasks like VPN, Mobil IP, Shaped Internet access, IP address saving, etc. |
28 |
It is completely user space implementation and does not require modification |
29 |
to any kernel parts. |
30 |
|
31 |
%prep |
32 |
|
33 |
%setup -q |
34 |
|
35 |
%build |
36 |
|
37 |
%configure \ |
38 |
--localstatedir=%{_localstatedir}/lib/%{name} \ |
39 |
--enable-ssl \ |
40 |
--disable-lzo |
41 |
|
42 |
#JMD: for static binary |
43 |
#perl -pi -e "s/-lz/-Wl,-static -lz/g;" Makefile |
44 |
|
45 |
|
46 |
#JMD: use this so we get Unix98 pty support |
47 |
|
48 |
cat << EOF >> config.h |
49 |
#define HAVE_GETPT |
50 |
#define HAVE_GRANTPT |
51 |
#define HAVE_UNLOCKPT |
52 |
#define HAVE_PTSNAME |
53 |
EOF |
54 |
|
55 |
make \ |
56 |
CFG_FILE=%{_sysconfdir}/vtund.conf \ |
57 |
PID_FILE=/var/run/vtund.pid \ |
58 |
STAT_DIR=/var/log/vtund \ |
59 |
LOCK_DIR=/var/lock/vtund |
60 |
|
61 |
%install |
62 |
rm -rf $RPM_BUILD_ROOT |
63 |
|
64 |
install -d $RPM_BUILD_ROOT/var/{log,lock}/vtund |
65 |
tar -jxvf %{SOURCE1} -C $RPM_BUILD_ROOT |
66 |
install vtund -D ${RPM_BUILD_ROOT}/%{_sbindir}/vtund |
67 |
install scripts/reroute ${RPM_BUILD_ROOT}/%{_sbindir} |
68 |
|
69 |
install vtund.8 -D ${RPM_BUILD_ROOT}/%{_mandir}/man8/vtund.8 |
70 |
install vtund.conf.5 -D ${RPM_BUILD_ROOT}/%{_mandir}/man5/vtund.5 |
71 |
|
72 |
%clean |
73 |
rm -rf $RPM_BUILD_ROOT |
74 |
|
75 |
%post |
76 |
%_post_service vtund |
77 |
%_post_service vtunc |
78 |
|
79 |
%preun |
80 |
%_preun_service vtund |
81 |
%_preun_service vtunc |
82 |
|
83 |
%files |
84 |
%defattr(644,root,root,755) |
85 |
%doc ChangeLog Credits FAQ README README.Setup README.Shaper TODO |
86 |
%doc vtund.conf |
87 |
%config(noreplace) %_sysconfdir/xinetd.d/vtun |
88 |
%config(noreplace) %_sysconfdir/sysconfig/vtun? |
89 |
%_initrddir/vtun? |
90 |
%dir /var/log/vtund |
91 |
%dir /var/lock/vtund |
92 |
%_mandir/man8/* |
93 |
%_mandir/man5/* |
94 |
%defattr(755,root,root,755) |
95 |
%_sbindir/vtund |
96 |
%_sbindir/reroute |
97 |
|
98 |
|
99 |
|
100 |
|