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
Summary: OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
18
URL: http://openvpn.net/
19
Source0: http://prdownloads.sourceforge.net/openvpn/%{name}-%{version}.tar.gz
22
Group: Applications/Internet
23
Vendor: James Yonan <jim@yonan.net>
24
Packager: James Yonan <jim@yonan.net>
25
BuildRoot: %{_tmppath}/%{name}-%(id -un)
28
# Include dependencies manually
33
BuildRequires: openssl-devel >= 0.9.7
34
Requires: openssl >= 0.9.7
36
%if "%{_vendor}" == "Mandrakesoft"
37
%{!?without_lzo:BuildRequires: liblzo1-devel >= 1.07}
38
%{!?without_lzo:Requires: liblzo1 >= 1.07}
40
%if "%{_vendor}" == "MandrakeSoft"
41
%{!?without_lzo:BuildRequires: liblzo1-devel >= 1.07}
42
%{!?without_lzo:Requires: liblzo1 >= 1.07}
44
%{!?without_lzo:BuildRequires: lzo-devel >= 1.07}
45
%{!?without_lzo:Requires: lzo >= 1.07}
49
%{!?without_pam:BuildRequires: pam-devel}
50
%{!?without_pam:Requires: pam}
52
%{?with_pkcs11:BuildRequires: pkcs11-helper-devel}
53
%{?with_pkcs11:Requires: pkcs11-helper}
60
OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
61
OpenVPN supports SSL/TLS security,
63
TCP or UDP tunnel transport through proxies or NAT,
64
support for dynamic IP addresses and DHCP,
65
scalability to hundreds or thousands of users,
66
and portability to most major OS platforms.
69
Summary: OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
70
Group: Applications/Internet
73
Development support for OpenVPN.
79
%if "%{_vendor}" == "suse" || "%{_vendor}" == "pc"
82
%define VENDOR %_vendor
89
%define debug_package %{nil}
92
# Build OpenVPN binary
100
--disable-dependency-tracking \
101
--docdir="%{_docdir}/%{name}-%{version}" \
102
%{?with_password_save:--enable-password-save} \
103
%{!?without_lzo:--enable-lzo} \
104
%{?with_pkcs11:--enable-pkcs11} \
105
%{?without_pam:--disable-plugin-auth-pam}
109
# Installation section
113
[ %{buildroot} != "/" ] && rm -rf %{buildroot}
114
%__make install DESTDIR="%{buildroot}"
116
# Install init script
117
%if "%{VENDOR}" == "SuSE"
118
%__install -c -d -m 755 "%{buildroot}/etc/init.d"
119
%__install -c -m 755 "distro/rpm/%{name}.init.d.suse" "%{buildroot}/etc/init.d/%{name}"
121
%__install -c -d -m 755 "%{buildroot}/etc/rc.d/init.d"
122
%__install -c -m 755 distro/rpm/%{name}.init.d.rhel "%{buildroot}/etc/rc.d/init.d/%{name}"
125
# Install /etc/openvpn
126
%__install -c -d -m 755 "%{buildroot}/etc/%{name}"
128
# Install extra %doc stuff
129
cp -r AUTHORS ChangeLog NEWS contrib/ sample/ \
130
"%{buildroot}/%{_docdir}/%{name}-%{version}"
137
[ %{buildroot} != "/" ] && rm -rf "%{buildroot}"
140
# On Linux 2.4, make the device node
146
/bin/mkdir /dev/net >/dev/null 2>&1
147
/bin/mknod /dev/net/tun c 10 200 >/dev/null 2>&1
152
# Handle the init script
155
/sbin/chkconfig --add %{name}
156
%if "%{VENDOR}" == "SuSE"
157
/etc/init.d/openvpn restart
159
/sbin/service %{name} condrestart
164
%if "%{VENDOR}" == "SuSE"
165
/etc/init.d/openvpn stop
167
/sbin/service %{name} stop
169
/sbin/chkconfig --del %{name}
175
# don't use %doc as old rpmbuild removes it[1].
176
# [1] http://rpm.org/ticket/836
179
%defattr(-,root,root)
183
%{_docdir}/%{name}-%{version}
185
%if "%{VENDOR}" == "SuSE"
188
/etc/rc.d/init.d/%{name}
192
%defattr(-,root,root)
196
* Thu Jul 30 2009 David Sommerseth <dazo@users.sourceforge.net>
197
- Removed management/ directory from %doc
199
* Thu Dec 14 2006 Alon Bar-Lev
202
* Mon Aug 2 2005 James Yonan
203
- Fixed build problem with --define 'without_pam 1'
205
* Mon Apr 4 2005 James Yonan
206
- Moved some files from /usr/share/openvpn to %doc for compatibility
207
with Dag Wieers' RPM repository
209
* Sat Mar 12 2005 Tom Walsh
210
- Added MandrakeSoft liblzo1 require
212
* Fri Dec 10 2004 James Yonan
213
- Added AutoReq: 0 for manual dependencies
215
* Fri Dec 10 2004 James Yonan
216
- Packaged the plugins
218
* Sun Nov 7 2004 Umberto Nicoletti
221
* Wed Aug 18 2004 Bishop Clark (LC957) <bishop@platypus.bc.ca>
222
- restrict what we claim in /etc/ to avoid ownership conflicts
224
* Sun Feb 23 2003 Matthias Andree <matthias.andree@gmx.de> 1.3.2.14-1.
225
- Have the version number filled in by autoconf.
227
* Wed Jul 10 2002 James Yonan <jim@yonan.net> 1.3.1-1
228
- Fixed %preun to only remove service on final uninstall
230
* Mon Jun 17 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.2.2-1
231
- Added condrestart to openvpn.spec & openvpn.init.
233
* Wed May 22 2002 James Yonan <jim@yonan.net> 1.2.0-1
234
- Added mknod for Linux 2.4.
236
* Wed May 15 2002 Doug Keller <dsk@voidstar.dyndns.org> 1.1.1.16-2
238
- Added conf file support
240
* Mon May 13 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.14-1
241
- Added new directories for config examples and such
243
* Sun May 12 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.13-1
244
- Updated buildroot directive and cleanup command
245
- added easy-rsa utilities
247
* Mon Mar 25 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.0-1