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}
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.
72 %if "
%{_vendor}" == "suse" || "%{_vendor}"
== "pc"
75 %define VENDOR
%_vendor
79 # Should we build the auth-pam module?
82 %define build_auth_pam
1
83 %{?without_pam:%define build_auth_pam 0}
89 %define debug_package
%{nil}
92 # Build OpenVPN binary
99 %configure --disable
-dependency
-tracking
%{?with_password_save:--enable-password-save} %{?without_lzo:--disable-lzo} %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include}
103 # Build down-root plugin
104 pushd plugin
/down
-root
108 # Build auth-pam plugin
109 %if %{build_auth_pam}
110 pushd plugin
/auth
-pam
116 # Installation section
120 [ %{buildroot} != "/" ] && rm -rf %{buildroot}
123 %__install -c
-d
-m
755 %{buildroot}%{_mandir}/man8
124 %__install -c
-m
755 %{name}.8 %{buildroot}%{_mandir}/man8
127 %__install -c
-d
-m
755 %{buildroot}%{_sbindir}
128 %__install -c
-m
755 %{name} %{buildroot}%{_sbindir}
130 # Install init script
131 %if "
%{VENDOR}"
== "SuSE"
132 %__install -c
-d
-m
755 %{buildroot}/etc
/init.d
133 %__sed -e 's
#openvpn=\"/usr/local/sbin/openvpn\"#openvpn=\"/usr/sbin/openvpn\"#' < suse/%{name}.init > %{_tmppath}/%{name}.init
134 %__install -c
-m
755 %{_tmppath}/%{name}.init %{buildroot}/etc/init.d/%{name}
135 %__rm %{_tmppath}/%{name}.init
137 %__install -c
-d
-m
755 %{buildroot}/etc
/rc.d
/init.d
138 %__install -c
-m
755 sample
-scripts
/%{name}.init %{buildroot}/etc/rc.d/init.d/%{name}
141 # Install /etc/openvpn
142 %__install -c
-d
-m
755 %{buildroot}/etc/%{name}
145 # Build /usr/share/openvpn
148 %__mkdir_p %{buildroot}%{_datadir}/%{name}
151 # Install the plugins
154 %__mkdir_p %{buildroot}%{_datadir}/%{name}/plugin
/lib
156 for pi
in auth
-pam down
-root
; do
157 %__mv -f plugin
/$pi
/README plugin
/README.$pi
158 if [ -e plugin
/$pi
/openvpn
-$pi.so
]; then
159 %__install -c
-m
755 plugin
/$pi
/openvpn
-$pi.so
%{buildroot}%{_datadir}/openvpn
/plugin
/lib
/openvpn
-$pi.so
163 %__mv -f plugin
/README plugin
/README.plugins
170 [ %{buildroot} != "/" ] && rm -rf %{buildroot}
173 # On Linux 2.4, make the device node
179 /bin
/mkdir /dev
/net
>/dev
/null
2>&1
180 /bin
/mknod
/dev
/net
/tun c
10 200 >/dev
/null
2>&1
185 # Handle the init script
188 /sbin
/chkconfig
--add
%{name}
189 %if "
%{VENDOR}"
== "SuSE"
190 /etc
/init.d
/openvpn restart
192 /sbin
/service
%{name} condrestart
197 %if "
%{VENDOR}"
== "SuSE"
198 /etc
/init.d
/openvpn stop
200 /sbin
/service
%{name} stop
202 /sbin
/chkconfig
--del
%{name}
210 %defattr(-,root
,root
)
211 %doc AUTHORS ChangeLog COPYING COPYRIGHT.GPL INSTALL NEWS PORTS README
212 %{_mandir}/man8/%{name}.8*
216 %if "
%{VENDOR}"
== "SuSE"
219 /etc
/rc.d
/init.d
/%{name}
222 # Install extra %doc stuff
223 %doc contrib
/ easy
-rsa
/ management
/ sample
-*/ plugin
/README.
*
227 * Mon Aug
2 2005 James Yonan
228 - Fixed build problem with
--define 'without_pam
1'
230 * Mon Apr
4 2005 James Yonan
231 - Moved some files from
/usr
/share
/openvpn to
%doc for compatibility
232 with Dag Wieers' RPM repository
234 * Sat Mar
12 2005 Tom Walsh
235 - Added MandrakeSoft liblzo1 require
237 * Fri Dec
10 2004 James Yonan
238 - Added AutoReq
: 0 for manual dependencies
240 * Fri Dec
10 2004 James Yonan
241 - Packaged the plugins
243 * Sun Nov
7 2004 Umberto Nicoletti
246 * Wed Aug
18 2004 Bishop Clark
(LC957
) <bishop@platypus.bc.ca
>
247 - restrict what we claim
in /etc
/ to avoid ownership conflicts
249 * Sun Feb
23 2003 Matthias Andree
<matthias.andree@gmx.de
> 1.3.2.14-1.
250 - Have the version number filled
in by autoconf.
252 * Wed Jul
10 2002 James Yonan
<jim@yonan.net
> 1.3.1-1
253 - Fixed
%preun to only remove service on final uninstall
255 * Mon Jun
17 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.2.2-1
256 - Added condrestart to openvpn.spec
& openvpn.init.
258 * Wed May
22 2002 James Yonan
<jim@yonan.net
> 1.2.0-1
259 - Added mknod
for Linux
2.4.
261 * Wed May
15 2002 Doug Keller
<dsk@voidstar.dyndns.org
> 1.1.1.16-2
263 - Added conf file support
265 * Mon May
13 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.1.1.14-1
266 - Added new directories
for config examples and such
268 * Sun May
12 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.1.1.13-1
269 - Updated buildroot directive and cleanup
command
270 - added easy
-rsa utilities
272 * Mon Mar
25 2002 bishop clark
(LC957
) <bishop@platypus.bc.ca
> 1.0-1