]> git.pld-linux.org Git - packages/apache1-mod_auth_samba.git/blob - apache1-mod_auth_samba.spec
- BR s@%{apxs}@apache1-apxs@g
[packages/apache1-mod_auth_samba.git] / apache1-mod_auth_samba.spec
1 # TODO
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}
8 Version:        1.1
9 Release:        4
10 Epoch:          1
11 License:        GPL
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)
25 Requires:       pam-pam_smb
26 Obsoletes:      apache-mod_auth_samba <= 1:1.1
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
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
32
33 %description
34 This is an authentication module for Apache that allows you to
35 authenticate HTTP clients using user entries in an samba directory.
36
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.
40
41 %prep
42 %setup -q -n mod_%{mod_name}
43 %patch0 -p1
44
45 %build
46 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so \
47         -lgdbm -lcrypt -lpam /%{_lib}/security/pam_smb_auth.so
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
52
53 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
54
55 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
56         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %post
62 %service -q apache restart
63
64 %postun
65 if [ "$1" = "0" ]; then
66         %service -q apache restart
67 fi
68
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
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc *.html
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}/*
This page took 0.109144 seconds and 3 git commands to generate.