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