2 Summary(pl.UTF-8): Serwer VPN
7 Group: Networking/Daemons
8 Source0: http://www.openvpn.net/release/%{name}-%{version}.tar.gz
9 # Source0-md5: b273ed2b5ec8616fb9834cde8634bce7
11 Source2: %{name}.sysconfig
12 Source3: %{name}-update-resolv-conf
13 Patch0: %{name}-optflags.patch
14 Patch1: easy-rsa2.patch
15 Patch2: %{name}-pam.patch
16 URL: http://www.openvpn.net/
17 BuildRequires: autoconf
18 BuildRequires: automake
19 BuildRequires: lzo-devel
20 BuildRequires: openssl-devel >= 0.9.7d
21 BuildRequires: pam-devel
22 BuildRequires: pkcs11-helper-devel
23 BuildRequires: rpmbuild(macros) >= 1.268
24 Requires(post,preun): /sbin/chkconfig
26 Requires: rc-scripts >= 0.4.0.19
27 Conflicts: kernel < 2.4
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _localstatedir /var
33 OpenVPN is a robust and highly configurable VPN (Virtual Private
34 Network) daemon which can be used to securely link two or more private
35 networks using an encrypted tunnel over the internet.
37 %description -l pl.UTF-8
38 OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne
39 Sieci Prywatne), który może być użyty do bezpiecznego łączenia dwóch
40 lub więcej prywatnych sieci używając zaszyfrowanego tunelu poprzez
44 Summary: Header files for OpenVPN plugins development
45 Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia wtyczek OpenVPN
46 Group: Development/Libraries
49 This is the package containing the header files for OpenVPN plugins
52 %description devel -l pl.UTF-8
53 Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
56 Summary: Small RSA key management package
57 Summary(pl.UTF-8): Mały pakiet do zarządzania kluczami RSA
60 Requires: openssl-tools
62 %description -n easy-rsa
63 This is a small RSA key management package, based on the openssl
64 command line tool, that can be found in the easy-rsa subdirectory of
65 the OpenVPN distribution.
67 For step-by-step instructions, see the HOWTO:
68 <http://www.openvpn.net/index.php/documentation/howto.html>.
70 %description -n easy-rsa -l pl.UTF-8
71 To jest mały pakiet do zarządzania kluczami RSA, oparty na narzędziu
72 linii poleceń openssl. Pakiet ten pochodzi z podkatalogu easy-rsa
75 Instrukcje krok po kroku można znaleźć w HOWTO:
76 <http://www.openvpn.net/index.php/documentation/howto.html>.
84 mv plugin/auth-pam/README README.auth-pam
85 mv plugin/down-root/README README.down-root
87 sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
96 --enable-password-save \
99 %{__make} CFLAGS="%{rpmcflags} -D_GNU_SOURCE"
101 %{__make} -C plugin/auth-pam \
102 OPTFLAGS="%{rpmcflags}"
103 %{__make} -C plugin/down-root \
104 OPTFLAGS="%{rpmcflags}"
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
109 $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir},%{_libdir}/%{name}/plugins}
111 install openvpn $RPM_BUILD_ROOT%{_sbindir}
112 install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
114 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
115 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
116 install openvpn-plugin.h $RPM_BUILD_ROOT%{_includedir}
117 install plugin/{auth-pam,down-root}/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
120 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_datadir}}/easy-rsa
121 install -d $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa/keys
122 cp -a easy-rsa/2.0/{vars,openssl.cnf} $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa
123 cp -a easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,revoke-full,sign-req} $RPM_BUILD_ROOT%{_datadir}/easy-rsa
124 cp -a easy-rsa/2.0/pkitool $RPM_BUILD_ROOT%{_sbindir}
126 # we use cp -a, not to pull /bin/bash dependency
127 cp -a contrib/pull-resolv-conf/client.down $RPM_BUILD_ROOT%{_libdir}/%{name}
128 cp -a contrib/pull-resolv-conf/client.up $RPM_BUILD_ROOT%{_libdir}/%{name}
129 cp -a contrib/update-resolv-conf $RPM_BUILD_ROOT%{_libdir}/%{name}
132 rm -rf $RPM_BUILD_ROOT
135 /sbin/chkconfig --add openvpn
136 %service openvpn restart "OpenVPN"
139 if [ "$1" = "0" ]; then
140 %service openvpn stop
141 /sbin/chkconfig --del openvpn
145 %defattr(644,root,root,755)
146 %doc AUTHORS README* ChangeLog sample-config-files sample-keys sample-scripts
147 %dir %{_sysconfdir}/openvpn
148 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
149 %attr(755,root,root) %{_sbindir}/openvpn
150 %attr(754,root,root) /etc/rc.d/init.d/%{name}
151 %dir %{_libdir}/%{name}
152 %attr(755,root,root) %{_libdir}/%{name}/client.down
153 %attr(755,root,root) %{_libdir}/%{name}/client.up
154 %attr(755,root,root) %{_libdir}/%{name}/update-resolv-conf
155 %dir %{_libdir}/%{name}/plugins
156 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
158 %dir /var/run/openvpn
161 %defattr(644,root,root,755)
162 %doc plugin/{README,examples/}
166 %defattr(644,root,root,755)
167 %doc easy-rsa/2.0/README
168 %dir %{_sysconfdir}/easy-rsa
169 %dir %attr(700,root,root) %{_sysconfdir}/easy-rsa/keys
170 %config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/vars
171 %config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/openssl.cnf
172 %attr(755,root,root) %{_sbindir}/pkitool
173 %dir %{_datadir}/easy-rsa
174 %attr(755,root,root) %{_datadir}/easy-rsa/*