]> git.pld-linux.org Git - packages/vtun.git/blob - vtun.spec
- updated to 2.6 (only patch4 must be forward ported)
[packages/vtun.git] / vtun.spec
1 # Conditional build:
2 # _without_ssl - build without encryption ability
3
4 Summary:        Virtual tunnel over TCP/IP networks
5 Summary(pl):    Wirtualne tunele poprzez sieci TCP/IP
6 Name:           vtun
7 Version:        2.6
8 Release:        0.1
9 Epoch:          2
10 License:        GPL
11 Group:          Networking/Daemons
12 Vendor:         Maxim Krasnyansky <max_mk@yahoo.com>
13 # Source0-md5:  309534fd03c5d13a19c43916f61f4bbf
14 Source0:        http://dl.sourceforge.net/vtun/%{name}-%{version}.tar.gz
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 URL:            http://vtun.sourceforge.net/
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  bison
26 BuildRequires:  flex
27 BuildRequires:  lzo-devel
28 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.7}
29 BuildRequires:  zlib-devel
30 PreReq:         rc-scripts
31 Requires(post,preun):   /sbin/chkconfig
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Obsoletes:      vppp
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
48 VTun umo¿liwia tworzenie Wirtualnych Tunelu poprzez sieci TCP/IP wraz
49 z przydzielaniem pasma, kompresj±, szyfrowaniem danych w tunelach.
50 Wspierane typy tuneli to: PPP, IP, Ethernet i wiêkszo¶æ pozosta³ych
51 protoko³ów szeregowych.
52
53 %prep
54 %setup -q -n vtun
55 %patch2 -p1
56 # must be ported
57 #%%patch4 -p1
58
59 %build
60 %{__aclocal}
61 %{__autoheader}
62 %{__autoconf}
63 %configure \
64         %{!?_without_ssl:--with-crypto-headers=%{_includedir}/openssl} \
65         %{?_without_ssl:--disable-ssl} \
66         --enable-lzo
67 %{__make}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
72         $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_localstatedir}/log/vtun}
73
74 %{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL_OWNER=""
75
76 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vtund
77 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vtun
78 touch $RPM_BUILD_ROOT%{_sysconfdir}/vtund.conf
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post
84 /sbin/chkconfig --add vtund
85 if [ -f /var/lock/subsys/vtund ]; then
86         /etc/rc.d/init.d/vtund restart >&2
87 else
88         echo "Run \"/etc/rc.d/init.d/vtund start\" to start vtun daemons."
89 fi
90
91 %preun
92 if [ "$1" = "0" ]; then
93         if [ -f /var/lock/subsys/vtund ]; then
94                 /etc/rc.d/init.d/vtund stop >&2
95         fi
96         /sbin/chkconfig --del vtund
97 fi
98
99 %files
100 %defattr(644,root,root,755)
101 %doc ChangeLog Credits README README.Setup README.Shaper FAQ TODO vtund.conf
102 %attr(754,root,root) /etc/rc.d/init.d/vtund
103 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/vtun
104 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/vtund.conf
105 %attr(755,root,root) %{_sbindir}/vtund
106 %attr(755,root,root) %dir /var/log/vtund
107 %{_mandir}/man*/*
This page took 0.064909 seconds and 3 git commands to generate.