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 # https://sourceforge.net/tracker/?func=detail&aid=2998676&group_id=48978&atid=454719
14 Source4: http://svn.openvpn.net/projects/openvpn/trunk/openvpn/management/management-notes.txt
15 # Source4-md5: 49dfbc513caf09d310f81bf330598c4b
16 Patch0: %{name}-optflags.patch
17 Patch1: easy-rsa2.patch
18 Patch2: %{name}-pam.patch
19 URL: http://www.openvpn.net/
20 BuildRequires: autoconf
21 BuildRequires: automake
22 BuildRequires: lzo-devel
23 BuildRequires: openssl-devel >= 0.9.7d
24 BuildRequires: pam-devel
25 BuildRequires: pkcs11-helper-devel
26 BuildRequires: rpmbuild(macros) >= 1.268
27 Requires(post,preun): /sbin/chkconfig
29 Requires: rc-scripts >= 0.4.0.19
30 Conflicts: kernel < 2.4
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _localstatedir /var
36 OpenVPN is a robust and highly configurable VPN (Virtual Private
37 Network) daemon which can be used to securely link two or more private
38 networks using an encrypted tunnel over the internet.
40 %description -l pl.UTF-8
41 OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne
42 Sieci Prywatne), który może być użyty do bezpiecznego łączenia dwóch
43 lub więcej prywatnych sieci używając zaszyfrowanego tunelu poprzez
47 Summary: Header files for OpenVPN plugins development
48 Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia wtyczek OpenVPN
49 Group: Development/Libraries
52 This is the package containing the header files for OpenVPN plugins
55 %description devel -l pl.UTF-8
56 Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
59 Summary: Small RSA key management package
60 Summary(pl.UTF-8): Mały pakiet do zarządzania kluczami RSA
63 Requires: openssl-tools
65 %description -n easy-rsa
66 This is a small RSA key management package, based on the openssl
67 command line tool, that can be found in the easy-rsa subdirectory of
68 the OpenVPN distribution.
70 For step-by-step instructions, see the HOWTO:
71 <http://www.openvpn.net/index.php/documentation/howto.html>.
73 %description -n easy-rsa -l pl.UTF-8
74 To jest mały pakiet do zarządzania kluczami RSA, oparty na narzędziu
75 linii poleceń openssl. Pakiet ten pochodzi z podkatalogu easy-rsa
78 Instrukcje krok po kroku można znaleźć w HOWTO:
79 <http://www.openvpn.net/index.php/documentation/howto.html>.
87 mv plugin/auth-pam/README README.auth-pam
88 mv plugin/down-root/README README.down-root
90 sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
101 --enable-password-save \
104 %{__make} CFLAGS="%{rpmcflags} -D_GNU_SOURCE"
106 %{__make} -C plugin/auth-pam \
107 OPTFLAGS="%{rpmcflags}"
108 %{__make} -C plugin/down-root \
109 OPTFLAGS="%{rpmcflags}"
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
114 $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir},%{_libdir}/%{name}/plugins}
116 install openvpn $RPM_BUILD_ROOT%{_sbindir}
117 install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
119 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
120 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
121 install openvpn-plugin.h $RPM_BUILD_ROOT%{_includedir}
122 install plugin/{auth-pam,down-root}/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
125 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_datadir}}/easy-rsa
126 install -d $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa/keys
127 cp -a easy-rsa/2.0/{vars,openssl.cnf} $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa
128 cp -a easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,revoke-full,sign-req} $RPM_BUILD_ROOT%{_datadir}/easy-rsa
129 cp -a easy-rsa/2.0/pkitool $RPM_BUILD_ROOT%{_sbindir}
131 # we use cp -a, not to pull /bin/bash dependency
132 cp -a contrib/pull-resolv-conf/client.down $RPM_BUILD_ROOT%{_libdir}/%{name}
133 cp -a contrib/pull-resolv-conf/client.up $RPM_BUILD_ROOT%{_libdir}/%{name}
134 cp -a contrib/update-resolv-conf $RPM_BUILD_ROOT%{_libdir}/%{name}
137 rm -rf $RPM_BUILD_ROOT
140 /sbin/chkconfig --add openvpn
141 %service openvpn restart "OpenVPN"
144 if [ "$1" = "0" ]; then
145 %service openvpn stop
146 /sbin/chkconfig --del openvpn
150 %defattr(644,root,root,755)
151 %doc AUTHORS README* ChangeLog sample-config-files sample-keys sample-scripts management-notes.txt
152 %dir %{_sysconfdir}/openvpn
153 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
154 %attr(755,root,root) %{_sbindir}/openvpn
155 %attr(754,root,root) /etc/rc.d/init.d/%{name}
156 %dir %{_libdir}/%{name}
157 %attr(755,root,root) %{_libdir}/%{name}/client.down
158 %attr(755,root,root) %{_libdir}/%{name}/client.up
159 %attr(755,root,root) %{_libdir}/%{name}/update-resolv-conf
160 %dir %{_libdir}/%{name}/plugins
161 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
163 %dir /var/run/openvpn
166 %defattr(644,root,root,755)
167 %doc plugin/{README,examples/}
171 %defattr(644,root,root,755)
172 %doc easy-rsa/2.0/README
173 %dir %{_sysconfdir}/easy-rsa
174 %dir %attr(700,root,root) %{_sysconfdir}/easy-rsa/keys
175 %config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/vars
176 %config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/openssl.cnf
177 %attr(755,root,root) %{_sbindir}/pkitool
178 %dir %{_datadir}/easy-rsa
179 %attr(755,root,root) %{_datadir}/easy-rsa/*