2 # - Cannot load mod_auth_samba.so into server: mod_auth_samba.so: undefined symbol: dbm_fetch
3 %define mod_name auth_samba
4 %define apxs /usr/sbin/apxs1
5 Summary: This is the samba authentication module for Apache
6 Summary(pl.UTF-8): Moduł uwierzytelnienia samba dla Apache
7 Name: apache1-mod_%{mod_name}
12 Group: Networking/Daemons
13 Source0: http://dl.sourceforge.net/modauthsamba/mod_%{mod_name}-%{version}.tar.gz
14 # Source0-md5: 9478a055e5cedd8c00beaed83d324240
15 Patch0: %{name}-symbol_fix.patch
16 URL: http://modauthsamba.sourceforge.net/
17 BuildRequires: apache1-apxs
18 BuildRequires: apache1-devel >= 1.3.33-2
19 BuildRequires: gdbm-devel
20 BuildRequires: pam-devel
21 BuildRequires: pam-pam_smb
22 BuildRequires: rpmbuild(macros) >= 1.268
23 Requires(triggerpostun): %{apxs}
24 Requires: apache1(EAPI)
26 Obsoletes: apache-mod_auth_samba <= 1:1.1
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
30 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
31 %define _noautoreq /%{_lib}/security/pam_smb_auth.so
34 This is an authentication module for Apache that allows you to
35 authenticate HTTP clients using user entries in an samba directory.
37 %description -l pl.UTF-8
38 To jest moduł uwierzytelnienia dla Apache pozwalający na
39 uwierzytelnianie klientów HTTP z użyciem wpisów w katalogu samby.
42 %setup -q -n mod_%{mod_name}
46 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so \
47 -lgdbm -lcrypt -lpam /%{_lib}/security/pam_smb_auth.so
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
53 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
55 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
56 $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
59 rm -rf $RPM_BUILD_ROOT
62 %service -q apache restart
65 if [ "$1" = "0" ]; then
66 %service -q apache restart
69 %triggerpostun -- apache1-mod_%{mod_name} < 1:1.1-2.1
70 # check that they're not using old apache.conf
71 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
72 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
76 %defattr(644,root,root,755)
78 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
79 %attr(755,root,root) %{_pkglibdir}/*