# # Conditional build: %bcond_without ssl # build without encryption ability # Summary: Virtual tunnel over TCP/IP networks Summary(pl.UTF-8): Wirtualne tunele poprzez sieci TCP/IP Name: vtun Version: 3.0.2 Release: 4 Epoch: 2 License: GPL Group: Networking/Daemons Source0: http://dl.sourceforge.net/vtun/%{name}-%{version}.tar.gz # Source0-md5: d3d8bc4d58886498a1c338670eab9315 Source1: %{name}.init Source2: %{name}.sysconfig Patch1: %{name}-autoheader.patch Patch2: %{name}-sslauth.patch Patch3: %{name}-linking.patch URL: http://vtun.sourceforge.net/ BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: flex BuildRequires: lzo-devel >= 2.0.1 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d} BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: zlib-devel Requires(post,preun): /sbin/chkconfig Requires: rc-scripts Obsoletes: vppp BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _localstatedir /var %description VTun provides the method for creating Virtual Tunnels over TCP/IP networks and allows to shape, compress, encrypt traffic in that tunnels. Supported type of tunnels are: PPP, IP, Ethernet and most of other serial protocols and programs. VTun is easily and highly configurable, it can be used for various network task like VPN, Mobil IP, Shaped Internet access, IP address saving, etc. It is completely user space implementation and does not require modification to any kernel parts. You need SSLeay-devel and lzo-devel to build it. %description -l pl.UTF-8 VTun umożliwia tworzenie tuneli poprzez sieci TCP/IP wraz z przydzielaniem pasma, kompresją, szyfrowaniem danych w tunelach. Wspierane typy tuneli to: PPP, IP, Ethernet i większość pozostałych protokołów szeregowych. VTun jest łatwy i elastyczny w konfiguracji. Może zostać wykorzystany do takich sieciowych zastosowań jak VPN, Mobil IP, łącza o określonym paśmie oraz innych. Działa w warstwie user space, więc nie wymaga dodatkowego wsparcia w jądrze. %prep %setup -q %patch1 -p1 %patch2 -p1 %patch3 -p1 %build cp -f /usr/share/automake/config.* . # aclocal.m4 is only local, don't try to rebuild #%{__autoheader} %{__autoconf} %configure \ %{?with_ssl:--with-crypto-headers=%{_includedir}/openssl} \ %{!?with_ssl:--disable-ssl} \ --enable-lzo %{__make} %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ INSTALL_OWNER="" install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf rm -f $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8 echo ".so vtund.8" > $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8 %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add vtund %service vtund restart "vtun daemons" %preun if [ "$1" = "0" ]; then %service vtund stop /sbin/chkconfig --del vtund fi %files %defattr(644,root,root,755) %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf %attr(754,root,root) /etc/rc.d/init.d/vtund %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vtun %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vtund.conf %attr(755,root,root) %{_sbindir}/vtund %attr(755,root,root) %dir /var/log/vtund %{_mandir}/man*/*