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