]>
Commit | Line | Data |
---|---|---|
26c3be48 ER |
1 | # TODO |
2 | # - Cannot load mod_auth_samba.so into server: mod_auth_samba.so: undefined symbol: dbm_fetch | |
ead9fb75 | 3 | %define mod_name auth_samba |
1569b59b | 4 | %define apxs /usr/sbin/apxs1 |
fcf44355 | 5 | Summary: This is the samba authentication module for Apache |
8a8ac980 | 6 | Summary(pl.UTF-8): Moduł uwierzytelnienia samba dla Apache |
1569b59b | 7 | Name: apache1-mod_%{mod_name} |
ead9fb75 | 8 | Version: 1.1 |
2f2a5e12 | 9 | Release: 4 |
b16937cd | 10 | Epoch: 1 |
ead9fb75 | 11 | License: GPL |
12 | Group: Networking/Daemons | |
97e2ad49 | 13 | Source0: http://dl.sourceforge.net/modauthsamba/mod_%{mod_name}-%{version}.tar.gz |
c412c8e6 | 14 | # Source0-md5: 9478a055e5cedd8c00beaed83d324240 |
3a13fd5f | 15 | Patch0: %{name}-symbol_fix.patch |
8c995450 | 16 | URL: http://modauthsamba.sourceforge.net/ |
a253e19d | 17 | BuildRequires: apache1-apxs |
26c3be48 | 18 | BuildRequires: apache1-devel >= 1.3.33-2 |
8c995450 JB |
19 | BuildRequires: gdbm-devel |
20 | BuildRequires: pam-devel | |
e38141ce | 21 | BuildRequires: pam-pam_smb |
6ed16c59 | 22 | BuildRequires: rpmbuild(macros) >= 1.268 |
26c3be48 | 23 | Requires(triggerpostun): %{apxs} |
2f2a5e12 | 24 | Requires: apache1(EAPI) |
e38141ce | 25 | Requires: pam-pam_smb |
ece350c6 | 26 | Obsoletes: apache-mod_auth_samba <= 1:1.1 |
ead9fb75 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
26c3be48 ER |
29 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
30 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
527b0a36 | 31 | %define _noautoreq /%{_lib}/security/pam_smb_auth.so |
ead9fb75 | 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 | ||
63da4bd2 JR |
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. | |
5035b63c | 40 | |
dbbefcc8 | 41 | %prep |
ead9fb75 | 42 | %setup -q -n mod_%{mod_name} |
3a13fd5f | 43 | %patch0 -p1 |
ead9fb75 | 44 | |
45 | %build | |
f0c62a38 JB |
46 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so \ |
47 | -lgdbm -lcrypt -lpam /%{_lib}/security/pam_smb_auth.so | |
ead9fb75 | 48 | |
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
26c3be48 | 51 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
ead9fb75 | 52 | |
53 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
54 | ||
26c3be48 ER |
55 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
56 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
57 | ||
8c995450 JB |
58 | %clean |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
ead9fb75 | 61 | %post |
6ed16c59 | 62 | %service -q apache restart |
ead9fb75 | 63 | |
c2c198c9 | 64 | %postun |
ead9fb75 | 65 | if [ "$1" = "0" ]; then |
6ed16c59 | 66 | %service -q apache restart |
ead9fb75 | 67 | fi |
68 | ||
26c3be48 ER |
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 | ||
ead9fb75 | 75 | %files |
76 | %defattr(644,root,root,755) | |
f475fd9e | 77 | %doc *.html |
9a8c546d | 78 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
ead9fb75 | 79 | %attr(755,root,root) %{_pkglibdir}/* |