From 5ec348f0e9bccced9c3a8e1c79261398819b2b72 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Mon, 30 Nov 2015 15:06:20 -0700
Subject: Fix plugin location (bug #1270984)
---
openvpn-auth-ldap.spec | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/openvpn-auth-ldap.spec b/openvpn-auth-ldap.spec
index f5995de..ea13ae0 100644
--- a/openvpn-auth-ldap.spec
+++ b/openvpn-auth-ldap.spec
@@ -1,7 +1,7 @@
Summary: OpenVPN plugin for LDAP authentication
Name: openvpn-auth-ldap
Version: 2.0.3
-Release: 17%{?dist}
+Release: 18%{?dist}
License: BSD
Group: Applications/Internet
URL:
http://code.google.com/p/openvpn-auth-ldap/
@@ -36,7 +36,7 @@ LDAP for OpenVPN 2.x.
%patch3 -p0 -b .gnustep
%patch4 -p1 -b .remoteAddress
# Fix plugin from the instructions in the included README
-sed -i 's|^plugin .*| plugin %{_libdir}/openvpn/plugin/lib/openvpn-auth-ldap.so
"/etc/openvpn/auth/ldap.conf"|g' README
+sed -i 's|^plugin .*| plugin %{_libdir}/openvpn/plugins/openvpn-auth-ldap.so
"/etc/openvpn/auth/ldap.conf"|g' README
# Install the one required OpenVPN plugin header
install -p -m 0644 %{SOURCE1} .
autoconf
@@ -50,7 +50,7 @@ autoheader
%if 0%{?fedora} || 0%{?rhel} >= 7
--with-objc-runtime=modern \
%endif
- --libdir=%{_libdir}/openvpn/plugin/lib \
+ --libdir=%{_libdir}/openvpn/plugins \
--with-openvpn="`pwd`"
make %{?_smp_mflags}
@@ -58,11 +58,16 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
# Main plugin
-mkdir -p %{buildroot}%{_libdir}/openvpn/plugin/lib
+mkdir -p %{buildroot}%{_libdir}/openvpn/plugins
make install DESTDIR=%{buildroot}
# Example config file
install -D -p -m 0600 auth-ldap.conf \
%{buildroot}%{_sysconfdir}/openvpn/auth/ldap.conf
+# Compatibility
+%if ( 0%{?fedora} && 0%{?fedora} < 24 ) || ( 0%{?rhel} && 0%{?rhel}
< 8 )
+mkdir -p %{buildroot}%{_libdir}/openvpn/plugin/lib
+ln -s ../../plugins/openvpn-auth-ldap.so %{buildroot}%{_libdir}/openvpn/plugin/lib
+%endif
%clean
@@ -70,14 +75,19 @@ rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
%doc LICENSE README auth-ldap.conf
%dir %{_sysconfdir}/openvpn/auth/
%config(noreplace) %{_sysconfdir}/openvpn/auth/ldap.conf
-%{_libdir}/openvpn/plugin/lib/openvpn-auth-ldap.so
+%{_libdir}/openvpn/plugins/openvpn-auth-ldap.so
+%if ( 0%{?fedora} && 0%{?fedora} < 24 ) || ( 0%{?rhel} && 0%{?rhel}
< 8 )
+%{_libdir}/openvpn/plugin
+%endif
%changelog
+* Mon Nov 30 2015 Orion Poplaski <orion(a)cora.nwra.com> - 2.0.3-18
+- Fix plugin location (bug #1270984)
+
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
2.0.3-17
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
--
cgit v0.11.2
http://pkgs.fedoraproject.org/cgit/openvpn-auth-ldap.git/commit/?h=master...