]>
Commit | Line | Data |
---|---|---|
c2ef35e0 | 1 | # |
df2a14e1 | 2 | # Conditional build: |
c2ef35e0 | 3 | %bcond_without ssl # build without encryption ability |
4 | # | |
8e6b0ccb | 5 | Summary: Virtual tunnel over TCP/IP networks |
b5b28518 | 6 | Summary(pl.UTF-8): Wirtualne tunele poprzez sieci TCP/IP |
1dc48ba5 | 7 | Name: vtun |
5e120748 | 8 | Version: 2.6 |
1dc66894 | 9 | Release: 4 |
91d79fbf | 10 | Epoch: 2 |
1dc48ba5 | 11 | License: GPL |
12 | Group: Networking/Daemons | |
9cc026ff | 13 | Source0: http://dl.sourceforge.net/vtun/%{name}-%{version}.tar.gz |
dbe44cd3 | 14 | # Source0-md5: 309534fd03c5d13a19c43916f61f4bbf |
1dc48ba5 | 15 | Source1: %{name}.init |
b32c5512 | 16 | Source2: %{name}.sysconfig |
f9b827b2 | 17 | Patch0: %{name}-makefile.patch |
91d79fbf | 18 | Patch1: %{name}-expect.patch |
0ce71b67 SZ |
19 | Patch2: %{name}-autoheader.patch |
20 | Patch3: %{name}-getpt.patch | |
3601b414 | 21 | Patch4: %{name}-sslauth.patch |
e28f7a79 | 22 | Patch5: %{name}-ac.patch |
2d4baaf0 | 23 | Patch6: %{name}-lzo2.patch |
25928601 | 24 | Patch7: %{name}-linking.patch |
a21572dc | 25 | URL: http://vtun.sourceforge.net/ |
3fd96c97 | 26 | BuildRequires: autoconf |
59c6eeff | 27 | BuildRequires: automake |
9cc026ff JB |
28 | BuildRequires: bison |
29 | BuildRequires: flex | |
2d4baaf0 | 30 | BuildRequires: lzo-devel >= 2.0.1 |
3a6d8a84 | 31 | %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d} |
dbe44cd3 | 32 | BuildRequires: rpmbuild(macros) >= 1.268 |
c3d615ff | 33 | BuildRequires: zlib-devel |
9cc026ff | 34 | Requires(post,preun): /sbin/chkconfig |
23c4c207 | 35 | Requires: rc-scripts |
1dc48ba5 | 36 | Obsoletes: vppp |
c2ef35e0 | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1dc48ba5 | 38 | |
39 | %define _localstatedir /var | |
40 | ||
41 | %description | |
f9b827b2 | 42 | VTun provides the method for creating Virtual Tunnels over TCP/IP |
43 | networks and allows to shape, compress, encrypt traffic in that | |
44 | tunnels. Supported type of tunnels are: PPP, IP, Ethernet and most of | |
45 | other serial protocols and programs. VTun is easily and highly | |
46 | configurable, it can be used for various network task like VPN, Mobil | |
47 | IP, Shaped Internet access, IP address saving, etc. It is completely | |
48 | user space implementation and does not require modification to any | |
49 | kernel parts. You need SSLeay-devel and lzo-devel to build it. | |
1dc48ba5 | 50 | |
49f82e4a JR |
51 | %description -l pl.UTF-8 |
52 | VTun umożliwia tworzenie tuneli poprzez sieci TCP/IP wraz z | |
53 | przydzielaniem pasma, kompresją, szyfrowaniem danych w tunelach. | |
54 | Wspierane typy tuneli to: PPP, IP, Ethernet i większość pozostałych | |
55 | protokołów szeregowych. VTun jest łatwy i elastyczny w konfiguracji. | |
56 | Może zostać wykorzystany do takich sieciowych zastosowań jak VPN, | |
57 | Mobil IP, łącza o określonym paśmie oraz innych. Działa w warstwie | |
58 | user space, więc nie wymaga dodatkowego wsparcia w jądrze. | |
8aa2c96b | 59 | |
1dc48ba5 | 60 | %prep |
23c4c207 | 61 | %setup -q -n %{name} |
0ce71b67 | 62 | %patch2 -p1 |
e28f7a79 | 63 | %patch5 -p1 |
2d4baaf0 | 64 | %patch6 -p1 |
25928601 | 65 | %patch7 -p1 |
5e120748 AF |
66 | # must be ported |
67 | #%%patch4 -p1 | |
280204c6 | 68 | |
1dc48ba5 | 69 | %build |
59c6eeff | 70 | cp -f /usr/share/automake/config.* . |
34eb26dd | 71 | # aclocal.m4 is only local, don't try to rebuild |
c82a3988 | 72 | %{__autoheader} |
61e7a59f | 73 | %{__autoconf} |
1dc48ba5 | 74 | %configure \ |
c2ef35e0 | 75 | %{?with_ssl:--with-crypto-headers=%{_includedir}/openssl} \ |
76 | %{!?with_ssl:--disable-ssl} \ | |
d8ba586c | 77 | --enable-lzo |
d5c1d2f4 | 78 | %{__make} |
1dc48ba5 | 79 | |
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
c3d615ff | 82 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ |
ba516adb | 83 | $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun} |
1dc48ba5 | 84 | |
34eb26dd JB |
85 | %{__make} install \ |
86 | DESTDIR=$RPM_BUILD_ROOT \ | |
87 | INSTALL_OWNER="" | |
1dc48ba5 | 88 | |
2b4a6e71 | 89 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund |
90 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun | |
5e120748 | 91 | touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf |
1dc48ba5 | 92 | |
2896b950 JB |
93 | %clean |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
1dc48ba5 | 96 | %post |
ac498ad8 | 97 | /sbin/chkconfig --add vtund |
dbe44cd3 | 98 | %service vtund restart "vtun daemons" |
1dc48ba5 | 99 | |
100 | %preun | |
ac498ad8 | 101 | if [ "$1" = "0" ]; then |
dbe44cd3 | 102 | %service vtund stop |
ac498ad8 | 103 | /sbin/chkconfig --del vtund |
104 | fi | |
1dc48ba5 | 105 | |
1dc48ba5 | 106 | %files |
107 | %defattr(644,root,root,755) | |
5e120748 | 108 | %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf |
2b4a6e71 | 109 | %attr(754,root,root) /etc/rc.d/init.d/vtund |
23c4c207 ER |
110 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vtun |
111 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vtund.conf | |
1dc48ba5 | 112 | %attr(755,root,root) %{_sbindir}/vtund |
113 | %attr(755,root,root) %dir /var/log/vtund | |
d8ba586c | 114 | %{_mandir}/man*/* |