]> git.pld-linux.org Git - packages/openvpn.git/blob - openvpn.spec
- include management-notes.txt in %doc; rel 3
[packages/openvpn.git] / openvpn.spec
1 Summary:        VPN Daemon
2 Summary(pl.UTF-8):      Serwer VPN
3 Name:           openvpn
4 Version:        2.1.1
5 Release:        3
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://www.openvpn.net/release/%{name}-%{version}.tar.gz
9 # Source0-md5:  b273ed2b5ec8616fb9834cde8634bce7
10 Source1:        %{name}.init
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
28 Requires:       /sbin/ip
29 Requires:       rc-scripts >= 0.4.0.19
30 Conflicts:      kernel < 2.4
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
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
44 internet.
45
46 %package devel
47 Summary:        Header files for OpenVPN plugins development
48 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia wtyczek OpenVPN
49 Group:          Development/Libraries
50
51 %description devel
52 This is the package containing the header files for OpenVPN plugins
53 development.
54
55 %description devel -l pl.UTF-8
56 Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
57
58 %package -n easy-rsa
59 Summary:        Small RSA key management package
60 Summary(pl.UTF-8):      Mały pakiet do zarządzania kluczami RSA
61 Group:          Applications
62 Requires:       grep
63 Requires:       openssl-tools
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:
71 <http://www.openvpn.net/index.php/documentation/howto.html>.
72
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
76 dystrybucji OpenVPN.
77
78 Instrukcje krok po kroku można znaleźć w HOWTO:
79 <http://www.openvpn.net/index.php/documentation/howto.html>.
80
81 %prep
82 %setup -q
83 %patch0 -p1
84 %patch1 -p1
85 %patch2 -p1
86
87 mv plugin/auth-pam/README README.auth-pam
88 mv plugin/down-root/README README.down-root
89
90 sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
91
92 cp %{SOURCE4} .
93
94 %build
95 %{__aclocal}
96 %{__autoheader}
97 %{__autoconf}
98 %{__automake}
99
100 %configure \
101         --enable-password-save \
102         --enable-pthread \
103         --enable-iproute2
104 %{__make} CFLAGS="%{rpmcflags} -D_GNU_SOURCE"
105
106 %{__make} -C plugin/auth-pam \
107         OPTFLAGS="%{rpmcflags}"
108 %{__make} -C plugin/down-root \
109         OPTFLAGS="%{rpmcflags}"
110
111 %install
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}
115
116 install openvpn $RPM_BUILD_ROOT%{_sbindir}
117 install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
118
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
123
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
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}
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %post
140 /sbin/chkconfig --add openvpn
141 %service openvpn restart "OpenVPN"
142
143 %preun
144 if [ "$1" = "0" ]; then
145         %service openvpn stop
146         /sbin/chkconfig --del openvpn
147 fi
148
149 %files
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
162 %{_mandir}/man?/*
163 %dir /var/run/openvpn
164
165 %files devel
166 %defattr(644,root,root,755)
167 %doc plugin/{README,examples/}
168 %{_includedir}/*.h
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
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/*
This page took 0.047231 seconds and 3 git commands to generate.