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: f952c5895ae8f40235aaad9a8f41a4bd
16 Source2: %{name}.sysconfig
17 Source3: %{name}.service
19 Patch1: %{name}-autoheader.patch
20 Patch2: %{name}-sslauth.patch
21 Patch3: %{name}-linking.patch
22 Patch4: %{name}-openssl-1.1.patch
23 Patch5: %{name}-dont-inline.patch
24 Patch6: no-strip.patch
25 URL: http://vtun.sourceforge.net/
26 BuildRequires: autoconf
27 BuildRequires: automake
30 BuildRequires: lzo-devel >= 2.0.1
31 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
32 BuildRequires: rpmbuild(macros) >= 1.671
33 BuildRequires: zlib-devel
34 Requires(post,preun): /sbin/chkconfig
36 Requires: systemd-units >= 206-6
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define _localstatedir /var
43 VTun provides the method for creating Virtual Tunnels over TCP/IP
44 networks and allows to shape, compress, encrypt traffic in that
45 tunnels. Supported type of tunnels are: PPP, IP, Ethernet and most of
46 other serial protocols and programs. VTun is easily and highly
47 configurable, it can be used for various network task like VPN, Mobil
48 IP, Shaped Internet access, IP address saving, etc. It is completely
49 user space implementation and does not require modification to any
50 kernel parts. You need SSLeay-devel and lzo-devel to build it.
52 %description -l pl.UTF-8
53 VTun umożliwia tworzenie tuneli poprzez sieci TCP/IP wraz z
54 przydzielaniem pasma, kompresją, szyfrowaniem danych w tunelach.
55 Wspierane typy tuneli to: PPP, IP, Ethernet i większość pozostałych
56 protokołów szeregowych. VTun jest łatwy i elastyczny w konfiguracji.
57 Może zostać wykorzystany do takich sieciowych zastosowań jak VPN,
58 Mobil IP, łącza o określonym paśmie oraz innych. Działa w warstwie
59 user space, więc nie wymaga dodatkowego wsparcia w jądrze.
71 cp -f /usr/share/automake/config.* .
72 # aclocal.m4 is only local, don't try to rebuild
76 %{?with_ssl:--with-crypto-headers=%{_includedir}/openssl} \
77 %{!?with_ssl:--disable-ssl} \
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
84 $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun} \
85 $RPM_BUILD_ROOT{/lib/systemd/pld-helpers.d,%{systemdunitdir}}
88 DESTDIR=$RPM_BUILD_ROOT \
91 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund
92 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun
93 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/vtund.service
94 install %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/pld-helpers.d/vtund.sh
95 touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf
96 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
97 echo ".so vtund.8" > $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
100 rm -rf $RPM_BUILD_ROOT
103 /sbin/chkconfig --add vtund
104 %service vtund restart "vtun daemons"
105 %systemd_post vtund.service
108 if [ "$1" = "0" ]; then
110 /sbin/chkconfig --del vtund
112 %systemd_preun vtund.service
117 %triggerpostun -- %{name} < 2:3.0.3-1
118 %systemd_trigger vtund.service
121 %defattr(644,root,root,755)
122 %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf
123 %attr(754,root,root) /etc/rc.d/init.d/vtund
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vtun
125 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vtund.conf
126 %{systemdunitdir}/vtund.service
127 %attr(755,root,root) /lib/systemd/pld-helpers.d/vtund.sh
128 %attr(755,root,root) %{_sbindir}/vtund
129 %attr(755,root,root) %dir /var/log/vtund
130 %{_mandir}/man5/vtund.conf.5*
131 %{_mandir}/man8/vtun.8*
132 %{_mandir}/man8/vtund.8*