1 # OpenVPN spec file, used to drive rpmbuild
6 # rpmbuild -tb [openvpn.x.tar.gz] --define 'without_lzo 1'
9 # rpmbuild -tb [openvpn.x.tar.gz] --define 'without_pam 1'
11 # Allow passwords to be read from files
12 # rpmbuild -tb [openvpn.x.tar.gz] --define 'with_password_save 1'
14 # Use this on RH9 and RHEL3
15 # rpmbuild -tb [openvpn.x.tar.gz] --define 'with_kerberos 1'
17 Summary: OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
21 URL: http
://openvpn.net
/
22 Source0: http
://prdownloads.sourceforge.net
/openvpn
/%{name}-%{version}.tar.gz
25 Group: Applications
/Internet
26 Vendor: James Yonan
<jim@yonan.net
>
27 Packager: James Yonan
<jim@yonan.net
>
28 BuildRoot: %{_tmppath}/%{name}-%
(id
-un
)
31 # Include dependencies manually
36 BuildRequires
: openssl
-devel
>= 0.9.6
37 Requires: openssl
>= 0.9.6
39 %if "
%{_vendor}"
== "Mandrakesoft"
40 %{!?without_lzo:BuildRequires: liblzo1-devel >= 1.07}
41 %{!?without_lzo:Requires: liblzo1 >= 1.07}
43 %if "
%{_vendor}"
== "MandrakeSoft"
44 %{!?without_lzo:BuildRequires: liblzo1-devel >= 1.07}
45 %{!?without_lzo:Requires: liblzo1 >= 1.07}
47 %{!?without_lzo:BuildRequires: lzo-devel >= 1.07}
48 %{!?without_lzo:Requires: lzo >= 1.07}
52 %{!?without_pam:BuildRequires: pam-devel}
53 %{!?without_pam:Requires: pam}
55 %{!?with_pkcs11:BuildRequires: pkcs11-helper-devel}
56 %{!?with_pkcs11:Requires: pkcs11-helper}
63 OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
64 OpenVPN supports SSL
/TLS security
,
66 TCP or UDP tunnel transport through proxies or NAT
,
67 support
for dynamic IP addresses and DHCP
,
68 scalability to hundreds or thousands of users
,
69 and portability to most major OS platforms.
75 %if "
%{_vendor}" == "suse" || "%{_vendor}"
== "pc"
78 %define VENDOR
%_vendor
82 # Should we build the auth-pam module?
85 %define build_auth_pam
1
86 %{?without_pam:%define build_auth_pam 0}
92 %define debug_package
%{nil}
95 # Build OpenVPN binary
102 %configure --disable
-dependency
-tracking
%{?with_password_save:--enable-password-save} %{?without_lzo:--disable-lzo} %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include}
106 # Build down-root plugin
107 pushd plugin
/down
-root
111 # Build auth-pam plugin
112 %if %{build_auth_pam}
113 pushd plugin
/auth
-pam
119 # Installation section
123 [ %{buildroot} != "/" ] && rm -rf %{buildroot}
126 %__install -c
-d
-m
755 %{buildroot}%{_mandir}/man8
127 %__install -c
-m
755 %{name}.8 %{buildroot}%{_mandir}/man8
130 %__install -c
-d
-m
755 %{buildroot}%{_sbindir}
131 %__install -c
-m
755 %{name} %{buildroot}%{_sbindir}
133 # Install init script
134 %if "
%{VENDOR}"
== "SuSE"
135 %__install -c
-d
-m
755 %{buildroot}/etc
/init.d
136 %__sed -e 's
#openvpn=\"/usr/local/sbin/openvpn\"#openvpn=\"/usr/sbin/openvpn\"#' < suse/%{name}.init > %{_tmppath}/%{name}.init
137 %__install -c
-m
755 %{_tmppath}/%{name}.init %{buildroot}/etc/init.d/%{name}
138 %__rm %{_tmppath}/%{name}.init
140 %__install -c
-d
-m
755 %{buildroot}/etc
/rc.d
/init.d
141 %__install -c
-m
755 sample
-scripts
/%{name}.init %{buildroot}/etc/rc.d/init.d/%{name}
144 # Install /etc/openvpn
145 %__install -c
-d
-m
755 %{buildroot}/etc/%{name}
148 # Build /usr/share/openvpn
151 %__mkdir_p %{buildroot}%{_datadir}/%{name}
154 # Install the plugins
157 %__mkdir_p %{buildroot}%{_datadir}/%{name}/plugin
/lib
159 for pi
in auth
-pam down
-root
; do
160 %__mv -f plugin
/$pi
/README plugin
/README.$pi
161 if [ -e plugin
/$pi
/openvpn
-$pi.so
]; then
162 %__install -c
-m
755 plugin
/$pi
/openvpn
-$pi.so
%{buildroot}%{_datadir}/openvpn
/plugin
/lib
/openvpn
-$pi.so
166 %__mv -f plugin
/README plugin
/README.plugins
173 [ %{buildroot} != "/" ] && rm -rf %{buildroot}
176 # On Linux 2.4, make the device node
182 /bin
/mkdir /dev
/net
>/dev
/null
2>&1
183 /bin
/mknod
/dev
/net
/tun c
10 200 >/dev
/null
2>&1
188 # Handle the init script
191 /sbin
/chkconfig
--add
%{name}
192 %if "
%{VENDOR}"
== "SuSE"
193 /etc
/init.d
/openvpn restart
195 /sbin
/service
%{name} condrestart
200 %if "
%{VENDOR}"
== "SuSE"
201 /etc
/init.d
/openvpn stop
203 /sbin
/service
%{name} stop
205 /sbin
/chkconfig
--del
%{name}
213 %defattr(-,root
,root
)
214 %doc AUTHORS ChangeLog COPYING COPYRIGHT.GPL INSTALL NEWS PORTS README
215 %{_mandir}/man8/%{name}.8*
219 %if "
%{VENDOR}"
== "SuSE"
222 /etc
/rc.d
/init.d
/%{name}
225 # Install extra %doc stuff
226 %doc contrib
/ easy
-rsa
/ sample
-*/ plugin
/README.
*
229 * Thu Jul
30 2009 David Sommerseth
<dazo@users.sourceforge.net
>
230 - Removed management
/ directory from
%doc
232 * Thu Dec
14 2006 Alon Bar
-Lev
235 * Mon Aug
2 2005 James Yonan
236 - Fixed build problem with
--define 'without_pam
1'
238 * Mon Apr
4 2005 James Yonan
239 - Moved some files from
/usr
/share
/openvpn to
%doc for compatibility
240 with Dag Wieers' RPM repository
242 * Sat Mar
12 2005 Tom Walsh
243 - Added MandrakeSoft liblzo1 require
245 * Fri Dec
10 2004 James Yonan
246 - Added AutoReq
: 0 for manual dependencies
248 * Fri Dec
10 2004 James Yonan
249 - Packaged the plugins
251 * Sun Nov
7 2004 Umberto Nicoletti
254 * Wed Aug
18 2004 Bishop Clark
(LC957
) <bishop@platypus.bc.ca
>
255 - restrict what we claim
in /etc
/ to avoid ownership conflicts
257 * Sun Feb
23 2003 Matthias Andree
<matthias.andree@gmx.de
> 1.3.2.14-1.
258 - Have the version number filled
in by autoconf.
260 * Wed Jul
10 2002 James Yonan
<jim@yonan.net
> 1.3.1-1
261 - Fixed
%preun to only remove service on final uninstall
263 * Mon Jun
17 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.2.2-1
264 - Added condrestart to openvpn.spec
& openvpn.init.
266 * Wed May
22 2002 James Yonan
<jim@yonan.net
> 1.2.0-1
267 - Added mknod
for Linux
2.4.
269 * Wed May
15 2002 Doug Keller
<dsk@voidstar.dyndns.org
> 1.1.1.16-2
271 - Added conf file support
273 * Mon May
13 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.1.1.14-1
274 - Added new directories
for config examples and such
276 * Sun May
12 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.1.1.13-1
277 - Updated buildroot directive and cleanup
command
278 - added easy
-rsa utilities
280 * Mon Mar
25 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.0-1