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