]>
Commit | Line | Data |
---|---|---|
1e54a8c4 | 1 | Summary: VPN Daemon |
f284e4d9 | 2 | Summary(pl.UTF-8): Serwer VPN |
1e54a8c4 | 3 | Name: openvpn |
6a22ca81 SP |
4 | Version: 2.1.4 |
5 | Release: 1 | |
1e54a8c4 AM |
6 | License: GPL |
7 | Group: Networking/Daemons | |
6a22ca81 SP |
8 | Source0: http://swupdate.openvpn.net/community/releases/%{name}-%{version}.tar.gz |
9 | # Source0-md5: 96a11868082685802489254f03ff3bde | |
1e54a8c4 AM |
10 | Source1: %{name}.init |
11 | Source2: %{name}.sysconfig | |
6b9f12e5 | 12 | Source3: %{name}-update-resolv-conf |
531730d9 ER |
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 | |
6f1eceea AM |
16 | Patch0: %{name}-optflags.patch |
17 | Patch1: easy-rsa2.patch | |
07cae1c8 | 18 | Patch2: %{name}-pam.patch |
72e50cf3 | 19 | URL: http://www.openvpn.net/ |
a32abac3 JB |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
1e54a8c4 | 22 | BuildRequires: lzo-devel |
2d7ad149 | 23 | BuildRequires: openssl-devel >= 0.9.7d |
7367fd64 | 24 | BuildRequires: pam-devel |
d3fff5ef | 25 | BuildRequires: pkcs11-helper-devel |
60554416 | 26 | BuildRequires: rpmbuild(macros) >= 1.268 |
a32abac3 | 27 | Requires(post,preun): /sbin/chkconfig |
dc577c8b | 28 | Requires: /sbin/ip |
1a7a867b ER |
29 | Requires: rc-scripts >= 0.4.0.19 |
30 | Conflicts: kernel < 2.4 | |
1e54a8c4 AM |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %define _localstatedir /var | |
34 | ||
35 | %description | |
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. | |
39 | ||
22031f4a | 40 | %description -l pl.UTF-8 |
1e54a8c4 | 41 | OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne |
22031f4a JR |
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 | |
1e54a8c4 AM |
44 | internet. |
45 | ||
088b9e85 | 46 | %package devel |
a1c1b5a0 | 47 | Summary: Header files for OpenVPN plugins development |
f284e4d9 | 48 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia wtyczek OpenVPN |
088b9e85 ER |
49 | Group: Development/Libraries |
50 | ||
51 | %description devel | |
a1c1b5a0 JB |
52 | This is the package containing the header files for OpenVPN plugins |
53 | development. | |
54 | ||
22031f4a JR |
55 | %description devel -l pl.UTF-8 |
56 | Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN. | |
088b9e85 | 57 | |
1a7a867b ER |
58 | %package -n easy-rsa |
59 | Summary: Small RSA key management package | |
f284e4d9 | 60 | Summary(pl.UTF-8): Mały pakiet do zarządzania kluczami RSA |
3faee1a3 | 61 | Group: Applications |
c838cb1a | 62 | Requires: grep |
1a7a867b | 63 | Requires: openssl-tools |
1a7a867b ER |
64 | |
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. | |
69 | ||
70 | For step-by-step instructions, see the HOWTO: | |
72e50cf3 | 71 | <http://www.openvpn.net/index.php/documentation/howto.html>. |
1a7a867b | 72 | |
22031f4a JR |
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 | |
c838cb1a JB |
76 | dystrybucji OpenVPN. |
77 | ||
22031f4a | 78 | Instrukcje krok po kroku można znaleźć w HOWTO: |
72e50cf3 | 79 | <http://www.openvpn.net/index.php/documentation/howto.html>. |
c838cb1a | 80 | |
1e54a8c4 | 81 | %prep |
da7b9d5f | 82 | %setup -q |
7c5604b6 | 83 | %patch0 -p1 |
088b9e85 | 84 | %patch1 -p1 |
07cae1c8 | 85 | %patch2 -p1 |
1e54a8c4 | 86 | |
727c4226 ER |
87 | mv plugin/auth-pam/README README.auth-pam |
88 | mv plugin/down-root/README README.down-root | |
89 | ||
6b9f12e5 ER |
90 | sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf |
91 | ||
531730d9 ER |
92 | cp %{SOURCE4} . |
93 | ||
1e54a8c4 | 94 | %build |
8abf6e16 | 95 | %{__aclocal} |
96 | %{__autoheader} | |
97 | %{__autoconf} | |
98 | %{__automake} | |
73042e26 | 99 | |
8abf6e16 | 100 | %configure \ |
6f1eceea | 101 | --enable-password-save \ |
8c54323d | 102 | --enable-pthread \ |
103 | --enable-iproute2 | |
90f19f01 | 104 | %{__make} CFLAGS="%{rpmcflags} -D_GNU_SOURCE" |
1e54a8c4 | 105 | |
c838cb1a JB |
106 | %{__make} -C plugin/auth-pam \ |
107 | OPTFLAGS="%{rpmcflags}" | |
108 | %{__make} -C plugin/down-root \ | |
109 | OPTFLAGS="%{rpmcflags}" | |
088b9e85 | 110 | |
1e54a8c4 AM |
111 | %install |
112 | rm -rf $RPM_BUILD_ROOT | |
c13903eb | 113 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \ |
088b9e85 | 114 | $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir},%{_libdir}/%{name}/plugins} |
1e54a8c4 | 115 | |
f063e411 | 116 | install openvpn $RPM_BUILD_ROOT%{_sbindir} |
1e54a8c4 AM |
117 | install *.8 $RPM_BUILD_ROOT%{_mandir}/man8 |
118 | ||
55a7ee18 JK |
119 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
120 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
088b9e85 ER |
121 | install openvpn-plugin.h $RPM_BUILD_ROOT%{_includedir} |
122 | install plugin/{auth-pam,down-root}/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins | |
1e54a8c4 | 123 | |
1a7a867b ER |
124 | # easy-rsa 2.0 |
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} | |
130 | ||
727c4226 ER |
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} | |
6b9f12e5 | 134 | cp -a contrib/update-resolv-conf $RPM_BUILD_ROOT%{_libdir}/%{name} |
6f1eceea | 135 | |
1e54a8c4 AM |
136 | %clean |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
55a7ee18 JK |
139 | %post |
140 | /sbin/chkconfig --add openvpn | |
1a7a867b | 141 | %service openvpn restart "OpenVPN" |
55a7ee18 JK |
142 | |
143 | %preun | |
144 | if [ "$1" = "0" ]; then | |
1a7a867b | 145 | %service openvpn stop |
55a7ee18 | 146 | /sbin/chkconfig --del openvpn |
a34b9b51 | 147 | fi |
55a7ee18 | 148 | |
1e54a8c4 AM |
149 | %files |
150 | %defattr(644,root,root,755) | |
531730d9 | 151 | %doc AUTHORS README* ChangeLog sample-config-files sample-keys sample-scripts management-notes.txt |
f063e411 | 152 | %dir %{_sysconfdir}/openvpn |
088b9e85 | 153 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
1a7a867b | 154 | %attr(755,root,root) %{_sbindir}/openvpn |
e06b2f01 | 155 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
088b9e85 | 156 | %dir %{_libdir}/%{name} |
727c4226 ER |
157 | %attr(755,root,root) %{_libdir}/%{name}/client.down |
158 | %attr(755,root,root) %{_libdir}/%{name}/client.up | |
6b9f12e5 | 159 | %attr(755,root,root) %{_libdir}/%{name}/update-resolv-conf |
088b9e85 ER |
160 | %dir %{_libdir}/%{name}/plugins |
161 | %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so | |
1e54a8c4 | 162 | %{_mandir}/man?/* |
55a7ee18 | 163 | %dir /var/run/openvpn |
088b9e85 ER |
164 | |
165 | %files devel | |
166 | %defattr(644,root,root,755) | |
167 | %doc plugin/{README,examples/} | |
168 | %{_includedir}/*.h | |
1a7a867b ER |
169 | |
170 | %files -n easy-rsa | |
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 | |
a122d45e ER |
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 | |
1a7a867b ER |
177 | %attr(755,root,root) %{_sbindir}/pkitool |
178 | %dir %{_datadir}/easy-rsa | |
179 | %attr(755,root,root) %{_datadir}/easy-rsa/* |