]> git.pld-linux.org Git - packages/openvpn.git/blob - openvpn.spec
- obsolete comment
[packages/openvpn.git] / openvpn.spec
1
2 # Conditional build:
3 %bcond_without  pkcs11          # build without PKCS#11 support
4
5 Summary:        VPN Daemon
6 Summary(pl.UTF-8):      Serwer VPN
7 Name:           openvpn
8 Version:        2.3.0
9 Release:        1
10 License:        GPL
11 Group:          Networking/Daemons
12 Source0:        http://swupdate.openvpn.net/community/releases/%{name}-%{version}.tar.gz
13 # Source0-md5:  56cffde5d5320e0b1ec364d3e486aca9
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 Source3:        %{name}.tmpfiles
17 Patch0:         %{name}-pam.patch
18 URL:            http://www.openvpn.net/
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  lzo-devel
22 BuildRequires:  openssl-devel >= 0.9.7d
23 BuildRequires:  pam-devel
24 %{?with_pkcs11:BuildRequires:   pkcs11-helper-devel}
25 BuildRequires:  rpmbuild(macros) >= 1.268
26 Requires(post,preun):   /sbin/chkconfig
27 Requires:       /sbin/ip
28 Requires:       rc-scripts >= 0.4.3.0
29 Conflicts:      kernel < 2.4
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _localstatedir  /var
33
34 %description
35 OpenVPN is a robust and highly configurable VPN (Virtual Private
36 Network) daemon which can be used to securely link two or more private
37 networks using an encrypted tunnel over the internet.
38
39 %description -l pl.UTF-8
40 OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne
41 Sieci Prywatne), który może być użyty do bezpiecznego łączenia dwóch
42 lub więcej prywatnych sieci używając zaszyfrowanego tunelu poprzez
43 internet.
44
45 %package devel
46 Summary:        Header files for OpenVPN plugins development
47 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia wtyczek OpenVPN
48 Group:          Development/Libraries
49
50 %description devel
51 This is the package containing the header files for OpenVPN plugins
52 development.
53
54 %description devel -l pl.UTF-8
55 Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60
61 sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
62
63 %build
64 %{__aclocal} -I m4
65 %{__autoheader}
66 %{__autoconf}
67 %{__automake}
68
69 %configure \
70         %{!?with_pkcs11:--disable-pkcs11} \
71         --enable-password-save \
72         --enable-iproute2 \
73         IFCONFIG=/sbin/ifconfig \
74         IPROUTE=/sbin/ip \
75         ROUTE=/sbin/route \
76         NETSTAT=/bin/netstat
77
78 %{__make}
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
83         $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir}} \
84         $RPM_BUILD_ROOT{%{_libdir}/%{name}/plugins,/usr/lib/tmpfiles.d}
85
86 %{__make} install \
87         DESTDIR=$RPM_BUILD_ROOT
88
89 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
90 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
91 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 /sbin/chkconfig --add openvpn
98 %service openvpn restart "OpenVPN"
99
100 %preun
101 if [ "$1" = "0" ]; then
102         %service openvpn stop
103         /sbin/chkconfig --del openvpn
104 fi
105
106 %files
107 %defattr(644,root,root,755)
108 %doc AUTHORS README* ChangeLog sample/sample-{config-files,keys,scripts} doc/management-notes.txt
109 %doc *.IPv6 src/plugins/*/README.*
110 %dir %{_sysconfdir}/openvpn
111 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
112 %attr(755,root,root) %{_sbindir}/openvpn
113 %attr(754,root,root) /etc/rc.d/init.d/%{name}
114 %dir %{_libdir}/%{name}
115 %dir %{_libdir}/%{name}/plugins
116 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
117 %{_mandir}/man?/*
118 %dir /var/run/openvpn
119 /usr/lib/tmpfiles.d/%{name}.conf
120
121 %files devel
122 %defattr(644,root,root,755)
123 %doc doc/README.plugins sample/sample-plugins
124 %{_includedir}/*.h
This page took 0.079863 seconds and 3 git commands to generate.