]> git.pld-linux.org Git - SPECS.git/blob - apache1-mod_auth_samba.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.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-devel >= 1.3.39
18 BuildRequires:  gdbm-devel
19 BuildRequires:  pam-devel
20 BuildRequires:  pam-pam_smb
21 BuildRequires:  rpmbuild(macros) >= 1.268
22 Requires(triggerpostun):        %{apxs}
23 Requires:       apache1(EAPI)
24 Requires:       pam-pam_smb
25 Obsoletes:      apache-mod_auth_samba <= 1:1.1
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
30 %define         _noautoreq      /%{_lib}/security/pam_smb_auth.so
31
32 %description
33 This is an authentication module for Apache that allows you to
34 authenticate HTTP clients using user entries in an samba directory.
35
36 %description -l pl.UTF-8
37 To jest moduł uwierzytelnienia dla Apache pozwalający na
38 uwierzytelnianie klientów HTTP z użyciem wpisów w katalogu samby.
39
40 %prep
41 %setup -q -n mod_%{mod_name}
42 %patch0 -p1
43
44 %build
45 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so \
46         -lgdbm -lcrypt -lpam /%{_lib}/security/pam_smb_auth.so
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
51
52 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53
54 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
55         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %post
61 %service -q apache restart
62
63 %postun
64 if [ "$1" = "0" ]; then
65         %service -q apache restart
66 fi
67
68 %triggerpostun -- apache1-mod_%{mod_name} < 1:1.1-2.1
69 # check that they're not using old apache.conf
70 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
71         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
72 fi
73
74 %files
75 %defattr(644,root,root,755)
76 %doc *.html
77 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
78 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.453207 seconds and 3 git commands to generate.