1 %define mod_name auth_samba
2 %define apxs /usr/sbin/apxs
3 Summary: This is the samba authentication module for Apache
4 Summary(pl): Modu³ autentykacji samba dla Apache
5 Name: apache-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: ftp://ftp.sourceforge.net/pub/sourceforge/modauthsamba/mod_%{mod_name}-%{version}.tar.gz
11 Patch0: %{name}-symbol_fix.patch
12 URL: http://modauthsamba.sourceforge.net/
13 BuildRequires: %{apxs}
14 BuildRequires: apache(EAPI)-devel
15 BuildRequires: gdbm-devel
16 BuildRequires: pam-devel
17 BuildRequires: pam_smb
18 Prereq: %{_sbindir}/apxs
20 Requires: apache(EAPI)
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
26 This is an authentication module for Apache that allows you to
27 authenticate HTTP clients using user entries in an samba directory.
30 To jest modu³ autentykacji dla Apache pozwalaj±cy na autentykacjê
31 klientów HTTP z u¿yciem wpisów w katalogu samby.
34 %setup -q -n mod_%{mod_name}
38 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lgdbm -lcrypt -lpam /lib/security/pam_smb_auth.so
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT%{_pkglibdir}
44 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
47 rm -rf $RPM_BUILD_ROOT
50 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
51 if [ -f /var/lock/subsys/httpd ]; then
52 /etc/rc.d/init.d/httpd restart 1>&2
56 if [ "$1" = "0" ]; then
57 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
58 if [ -f /var/lock/subsys/httpd ]; then
59 /etc/rc.d/init.d/httpd restart 1>&2
64 %defattr(644,root,root,755)
66 %attr(755,root,root) %{_pkglibdir}/*