+# TODO
+# - RFC: currently plugins were installed to /usr/lib/openvpn/plugins,
+# perhaps just /usr/lib as they're prefixed with openvpn-? pros from
+# this is that then you don't need to specify full path to plugins
+# in openvpn.conf
Summary: VPN Daemon
Summary(pl): Serwer VPN
Name: openvpn
Version: 2.0.2
-Release: 2
+Release: 2.4
License: GPL
Group: Networking/Daemons
Source0: http://openvpn.net/release/%{name}-%{version}.tar.gz
Source1: %{name}.init
Source2: %{name}.sysconfig
Patch0: %{name}-2.0_rc16MH.patch
+Patch1: %{name}-optflags.patch
URL: http://openvpn.net/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: lzo-devel
BuildRequires: openssl-devel >= 0.9.7d
Conflicts: kernel < 2.4
-PreReq: rc-scripts >= 0.4.0.19
+Requires: rc-scripts >= 0.4.0.19
Requires(post,preun): /sbin/chkconfig
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
lub wiêcej prywatnych sieci u¿ywaj±c zaszyfrowanego tunelu poprzez
internet.
+%package devel
+Summary: Development libraries and header files for OpenVPN
+Group: Development/Libraries
+
+%description devel
+This is the package containing the development header files for
+OpenVPN.
+
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__aclocal}
--enable-iproute2
%{__make}
+%{__make} -C plugin/auth-pam
+%{__make} -C plugin/down-root
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
- $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn}
+ $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir},%{_libdir}/%{name}/plugins}
install openvpn $RPM_BUILD_ROOT%{_sbindir}
install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install openvpn-plugin.h $RPM_BUILD_ROOT%{_includedir}
+install plugin/{auth-pam,down-root}/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS README ChangeLog sample-config-files sample-keys easy-rsa sample-scripts
-%attr(755,root,root) %{_sbindir}/*
%dir %{_sysconfdir}/openvpn
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(755,root,root) %{_sbindir}/*
%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/plugins
+%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
%{_mandir}/man?/*
%dir /var/run/openvpn
+
+%files devel
+%defattr(644,root,root,755)
+%doc plugin/{README,examples/}
+%{_includedir}/*.h