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: http://dl.sourceforge.net/modauthsamba/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5: 9478a055e5cedd8c00beaed83d324240
12 Patch0: %{name}-symbol_fix.patch
13 URL: http://modauthsamba.sourceforge.net/
14 BuildRequires: %{apxs}
15 BuildRequires: apache(EAPI)-devel
16 BuildRequires: gdbm-devel
17 BuildRequires: pam-devel
18 BuildRequires: pam_smb
19 Prereq: %{_sbindir}/apxs
21 Requires: apache(EAPI)
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
27 This is an authentication module for Apache that allows you to
28 authenticate HTTP clients using user entries in an samba directory.
31 To jest modu³ autentykacji dla Apache pozwalaj±cy na autentykacjê
32 klientów HTTP z u¿yciem wpisów w katalogu samby.
35 %setup -q -n mod_%{mod_name}
39 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lgdbm -lcrypt -lpam /lib/security/pam_smb_auth.so
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT%{_pkglibdir}
45 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
48 rm -rf $RPM_BUILD_ROOT
51 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
52 if [ -f /var/lock/subsys/httpd ]; then
53 /etc/rc.d/init.d/httpd restart 1>&2
57 if [ "$1" = "0" ]; then
58 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
59 if [ -f /var/lock/subsys/httpd ]; then
60 /etc/rc.d/init.d/httpd restart 1>&2
65 %defattr(644,root,root,755)
67 %attr(755,root,root) %{_pkglibdir}/*