2 %bcond_with tests # check-based tests
4 Summary: OpenVPN Auth-LDAP Plugin
5 Summary(pl.UTF-8): Wtyczka Auth-LDAP dla OpenVPN
6 Name: openvpn-plugin-auth-ldap
11 Source0: https://github.com/threerings/openvpn-auth-ldap/archive/auth-ldap-%{version}.tar.gz
12 # Source0-md5: c4985fbbf88042e28efd1521d03bf658
13 Patch1: %{name}-objc-include.patch
14 URL: https://github.com/threerings/openvpn-auth-ldap
15 BuildRequires: autoconf
16 BuildRequires: automake
17 %{?with_tests:BuildRequires: check}
18 BuildRequires: gcc-objc
19 BuildRequires: openldap-devel
20 BuildRequires: openvpn-devel
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _libdir %{_prefix}/%{_lib}/openvpn/plugins
25 %define _sysconfdir /etc/openvpn
28 The openvpn-auth-ldap plugin implements username/password
29 authentication via LDAP.
31 %description -l pl.UTF-8
32 Wtyczka openvpn-auth-ldap implementuje uwierzytelnianie nazwą
33 użytkownika i hasłem poprzez LDAP.
36 %setup -q -n openvpn-auth-ldap-auth-ldap-%{version}
45 cp -f /usr/share/automake/config.sub .
47 OBJCFLAGS="-std=gnu11" \
48 --with-objc-runtime=GNU \
49 --with-check=%{!?with_tests:/proc}%{?with_tests:/usr} \
50 --with-openldap=/usr \
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}}
60 DESTDIR=$RPM_BUILD_ROOT
61 cp -a auth-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}
64 rm -rf $RPM_BUILD_ROOT
67 %defattr(644,root,root,755)
68 %doc LICENSE README.md
69 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auth-ldap.conf
70 %attr(755,root,root) %{_libdir}/openvpn-auth-ldap.so