1 ## $Revision: 1.78 $, $Date: 2009-02-08 17:05:53 $
4 %bcond_without ssl # build without encryption ability
6 Summary: Virtual tunnel over TCP/IP networks
7 Summary(pl.UTF-8): Wirtualne tunele poprzez sieci TCP/IP
13 Group: Networking/Daemons
14 Source0: http://dl.sourceforge.net/vtun/%{name}-%{version}.tar.gz
15 # Source0-md5: d3d8bc4d58886498a1c338670eab9315
17 Source2: %{name}.sysconfig
18 Patch1: %{name}-autoheader.patch
19 Patch2: %{name}-sslauth.patch
20 Patch3: %{name}-linking.patch
21 URL: http://vtun.sourceforge.net/
22 BuildRequires: autoconf
23 BuildRequires: automake
26 BuildRequires: lzo-devel >= 2.0.1
27 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
28 BuildRequires: rpmbuild(macros) >= 1.268
29 BuildRequires: zlib-devel
30 Requires(post,preun): /sbin/chkconfig
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _localstatedir /var
38 VTun provides the method for creating Virtual Tunnels over TCP/IP
39 networks and allows to shape, compress, encrypt traffic in that
40 tunnels. Supported type of tunnels are: PPP, IP, Ethernet and most of
41 other serial protocols and programs. VTun is easily and highly
42 configurable, it can be used for various network task like VPN, Mobil
43 IP, Shaped Internet access, IP address saving, etc. It is completely
44 user space implementation and does not require modification to any
45 kernel parts. You need SSLeay-devel and lzo-devel to build it.
47 %description -l pl.UTF-8
48 VTun umożliwia tworzenie tuneli poprzez sieci TCP/IP wraz z
49 przydzielaniem pasma, kompresją, szyfrowaniem danych w tunelach.
50 Wspierane typy tuneli to: PPP, IP, Ethernet i większość pozostałych
51 protokołów szeregowych. VTun jest łatwy i elastyczny w konfiguracji.
52 Może zostać wykorzystany do takich sieciowych zastosowań jak VPN,
53 Mobil IP, łącza o określonym paśmie oraz innych. Działa w warstwie
54 user space, więc nie wymaga dodatkowego wsparcia w jądrze.
63 cp -f /usr/share/automake/config.* .
64 # aclocal.m4 is only local, don't try to rebuild
68 %{?with_ssl:--with-crypto-headers=%{_includedir}/openssl} \
69 %{!?with_ssl:--disable-ssl} \
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
76 $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun}
79 DESTDIR=$RPM_BUILD_ROOT \
82 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund
83 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun
84 touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf
85 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
86 echo ".so vtund.8" > $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
89 rm -rf $RPM_BUILD_ROOT
92 /sbin/chkconfig --add vtund
93 %service vtund restart "vtun daemons"
96 if [ "$1" = "0" ]; then
98 /sbin/chkconfig --del vtund
102 %defattr(644,root,root,755)
103 %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf
104 %attr(754,root,root) /etc/rc.d/init.d/vtund
105 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vtun
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vtund.conf
107 %attr(755,root,root) %{_sbindir}/vtund
108 %attr(755,root,root) %dir /var/log/vtund