3 %bcond_without ssl # build without encryption ability
5 Summary: Virtual tunnel over TCP/IP networks
6 Summary(pl.UTF-8): Wirtualne tunele poprzez sieci TCP/IP
12 Group: Networking/Daemons
13 Source0: http://download.sourceforge.net/vtun/%{name}-%{version}.tar.gz
14 # Source0-md5: f3becf2a0270910a841060c08d1db824
16 Source2: %{name}.sysconfig
17 Source3: %{name}.service
19 Patch1: %{name}-autoheader.patch
20 Patch2: %{name}-sslauth.patch
21 Patch3: %{name}-linking.patch
22 URL: http://vtun.sourceforge.net/
23 BuildRequires: autoconf
24 BuildRequires: automake
27 BuildRequires: lzo-devel >= 2.0.1
28 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
29 BuildRequires: rpmbuild(macros) >= 1.671
30 BuildRequires: zlib-devel
31 Requires(post,preun): /sbin/chkconfig
33 Requires: systemd-units >= 206-6
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _localstatedir /var
40 VTun provides the method for creating Virtual Tunnels over TCP/IP
41 networks and allows to shape, compress, encrypt traffic in that
42 tunnels. Supported type of tunnels are: PPP, IP, Ethernet and most of
43 other serial protocols and programs. VTun is easily and highly
44 configurable, it can be used for various network task like VPN, Mobil
45 IP, Shaped Internet access, IP address saving, etc. It is completely
46 user space implementation and does not require modification to any
47 kernel parts. You need SSLeay-devel and lzo-devel to build it.
49 %description -l pl.UTF-8
50 VTun umożliwia tworzenie tuneli poprzez sieci TCP/IP wraz z
51 przydzielaniem pasma, kompresją, szyfrowaniem danych w tunelach.
52 Wspierane typy tuneli to: PPP, IP, Ethernet i większość pozostałych
53 protokołów szeregowych. VTun jest łatwy i elastyczny w konfiguracji.
54 Może zostać wykorzystany do takich sieciowych zastosowań jak VPN,
55 Mobil IP, łącza o określonym paśmie oraz innych. Działa w warstwie
56 user space, więc nie wymaga dodatkowego wsparcia w jądrze.
65 cp -f /usr/share/automake/config.* .
66 # aclocal.m4 is only local, don't try to rebuild
70 %{?with_ssl:--with-crypto-headers=%{_includedir}/openssl} \
71 %{!?with_ssl:--disable-ssl} \
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
78 $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun} \
79 $RPM_BUILD_ROOT{/lib/systemd/pld-helpers.d,%{systemdunitdir}}
82 DESTDIR=$RPM_BUILD_ROOT \
85 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund
86 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun
87 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/vtund.service
88 install %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/pld-helpers.d/vtund.sh
89 touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf
90 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
91 echo ".so vtund.8" > $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
94 rm -rf $RPM_BUILD_ROOT
97 /sbin/chkconfig --add vtund
98 %service vtund restart "vtun daemons"
99 %systemd_post vtund.service
102 if [ "$1" = "0" ]; then
104 /sbin/chkconfig --del vtund
106 %systemd_preun vtund.service
111 %triggerpostun -- %{name} < 2:3.0.3-1
112 %systemd_trigger vtund.service
115 %defattr(644,root,root,755)
116 %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf
117 %attr(754,root,root) /etc/rc.d/init.d/vtund
118 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vtun
119 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vtund.conf
120 %{systemdunitdir}/vtund.service
121 %attr(755,root,root) /lib/systemd/pld-helpers.d/vtund.sh
122 %attr(755,root,root) %{_sbindir}/vtund
123 %attr(755,root,root) %dir /var/log/vtund