]> git.pld-linux.org Git - packages/vtun.git/blob - vtun.spec
- started updated do 3.0.1, seems to be work,
[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:        3.0.1
9 Release:        0.1
10 Epoch:          2
11 License:        GPL
12 Group:          Networking/Daemons
13 Source0:        http://dl.sourceforge.net/vtun/%{name}-%{version}.tar.gz
14 # Source0-md5:  c342ffe77055d4248a38f0b380f28c1b
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
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 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
93 echo ".so vtund.8" > $RPM_BUILD_ROOT%{_mandir}/man8/vtun.8
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %post
99 /sbin/chkconfig --add vtund
100 %service vtund restart "vtun daemons"
101
102 %preun
103 if [ "$1" = "0" ]; then
104         %service vtund stop
105         /sbin/chkconfig --del vtund
106 fi
107
108 %files
109 %defattr(644,root,root,755)
110 %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf
111 %attr(754,root,root) /etc/rc.d/init.d/vtund
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vtun
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vtund.conf
114 %attr(755,root,root) %{_sbindir}/vtund
115 %attr(755,root,root) %dir /var/log/vtund
116 %{_mandir}/man*/*
This page took 0.073147 seconds and 3 git commands to generate.