]> git.pld-linux.org Git - packages/vtun.git/blob - vtun.spec
f2550ad82d6b1106869657260ab9f207f2fce9be
[packages/vtun.git] / vtun.spec
1 #
2 # Conditional build:
3 %bcond_without  ssl     # build without encryption ability
4 #
5 Summary:        Virtual tunnel over TCP/IP networks
6 Summary(pl.UTF-8):      Wirtualne tunele poprzez sieci TCP/IP
7 Name:           vtun
8 Version:        2.6
9 Release:        4
10 Epoch:          2
11 License:        GPL
12 Group:          Networking/Daemons
13 Source0:        http://dl.sourceforge.net/vtun/%{name}-%{version}.tar.gz
14 # Source0-md5:  309534fd03c5d13a19c43916f61f4bbf
15 Source1:        %{name}.init
16 Source2:        %{name}.sysconfig
17 Patch0:         %{name}-makefile.patch
18 Patch1:         %{name}-expect.patch
19 Patch2:         %{name}-autoheader.patch
20 Patch3:         %{name}-getpt.patch
21 Patch4:         %{name}-sslauth.patch
22 Patch5:         %{name}-ac.patch
23 Patch6:         %{name}-lzo2.patch
24 Patch7:         %{name}-linking.patch
25 URL:            http://vtun.sourceforge.net/
26 BuildRequires:  autoconf
27 BuildRequires:  automake
28 BuildRequires:  bison
29 BuildRequires:  flex
30 BuildRequires:  lzo-devel >= 2.0.1
31 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
32 BuildRequires:  rpmbuild(macros) >= 1.268
33 BuildRequires:  zlib-devel
34 Requires(post,preun):   /sbin/chkconfig
35 Requires:       rc-scripts
36 Obsoletes:      vppp
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _localstatedir  /var
40
41 %description
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.
50
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.
59
60 %prep
61 %setup -q -n %{name}
62 %patch2 -p1
63 %patch5 -p1
64 %patch6 -p1
65 %patch7 -p1
66 # must be ported
67 #%%patch4 -p1
68
69 %build
70 cp -f /usr/share/automake/config.* .
71 # aclocal.m4 is only local, don't try to rebuild
72 %{__autoheader}
73 %{__autoconf}
74 %configure \
75         %{?with_ssl:--with-crypto-headers=%{_includedir}/openssl} \
76         %{!?with_ssl:--disable-ssl} \
77         --enable-lzo
78 %{__make}
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
83         $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun}
84
85 %{__make} install \
86         DESTDIR=$RPM_BUILD_ROOT \
87         INSTALL_OWNER=""
88
89 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund
90 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun
91 touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 /sbin/chkconfig --add vtund
98 %service vtund restart "vtun daemons"
99
100 %preun
101 if [ "$1" = "0" ]; then
102         %service vtund stop
103         /sbin/chkconfig --del vtund
104 fi
105
106 %files
107 %defattr(644,root,root,755)
108 %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf
109 %attr(754,root,root) /etc/rc.d/init.d/vtund
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
112 %attr(755,root,root) %{_sbindir}/vtund
113 %attr(755,root,root) %dir /var/log/vtund
114 %{_mandir}/man*/*
This page took 0.023928 seconds and 2 git commands to generate.