X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache1-mod_auth_samba.spec;h=d052a87864744b334acd299340980061d32ebc06;hb=6ed16c594ed935bda3ece19bf0e73f13defc6e43;hp=f0cb9b83ed8bfe1cdd3555f5083a819d643a9d13;hpb=3a13fd5fb4fa2c0b6b3e1ff1caaf647ce9d2f279;p=packages%2Fapache1-mod_auth_samba.git diff --git a/apache1-mod_auth_samba.spec b/apache1-mod_auth_samba.spec index f0cb9b8..d052a87 100644 --- a/apache1-mod_auth_samba.spec +++ b/apache1-mod_auth_samba.spec @@ -1,57 +1,79 @@ +# TODO +# - Cannot load mod_auth_samba.so into server: mod_auth_samba.so: undefined symbol: dbm_fetch %define mod_name auth_samba +%define apxs /usr/sbin/apxs1 Summary: This is the samba authentication module for Apache -Name: apache-mod_%{mod_name} +Summary(pl): Modu³ uwierzytelnienia samba dla Apache +Name: apache1-mod_%{mod_name} Version: 1.1 -Release: 1 +Release: 3 +Epoch: 1 License: GPL Group: Networking/Daemons -Group(de): Netzwerkwesen/Server -Group(pl): Sieciowe/Serwery -Source0: ftp://download.sourceforge.net/pub/sourceforge/modauthsamba/mod_%{mod_name}-%{version}.tar.gz +Source0: http://dl.sourceforge.net/modauthsamba/mod_%{mod_name}-%{version}.tar.gz +# Source0-md5: 9478a055e5cedd8c00beaed83d324240 Patch0: %{name}-symbol_fix.patch -BuildRequires: /usr/sbin/apxs -BuildRequires: apache(EAPI)-devel -Prereq: /usr/sbin/apxs -Requires: apache(EAPI) URL: http://modauthsamba.sourceforge.net/ +BuildRequires: %{apxs} +BuildRequires: apache1-devel >= 1.3.33-2 +BuildRequires: gdbm-devel +BuildRequires: pam-devel +BuildRequires: pam-pam_smb +BuildRequires: rpmbuild(macros) >= 1.268 +Requires(triggerpostun): %{apxs} +Requires: apache1 >= 1.3.33-2 +Requires: pam-pam_smb +Obsoletes: apache-mod_auth_samba <= %{epoch}:%{version} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _pkglibdir %(/usr/sbin/apxs -q LIBEXECDIR) +%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) +%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) +%define _noautoreq /%{_lib}/security/pam_smb_auth.so %description This is an authentication module for Apache that allows you to authenticate HTTP clients using user entries in an samba directory. -%prep +%description -l pl +To jest modu³ uwierzytelnienia dla Apache pozwalaj±cy na +uwierzytelnianie klientów HTTP z u¿yciem wpisów w katalogu samby. + +%prep %setup -q -n mod_%{mod_name} %patch0 -p1 %build -/usr/sbin/apxs -c mod_%{mod_name}.c -o mod_%{mod_name}.so +%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so \ + -lgdbm -lcrypt -lpam /%{_lib}/security/pam_smb_auth.so %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_pkglibdir} +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} +echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ + $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf + +%clean +rm -rf $RPM_BUILD_ROOT + %post -/usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 -if [ -f /var/lock/subsys/httpd ]; then - /etc/rc.d/init.d/httpd restart 1>&2 -fi +%service -q apache restart -%preun +%postun if [ "$1" = "0" ]; then - /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 - if [ -f /var/lock/subsys/httpd ]; then - /etc/rc.d/init.d/httpd restart 1>&2 - fi + %service -q apache restart fi -%clean -rm -rf $RPM_BUILD_ROOT +%triggerpostun -- apache1-mod_%{mod_name} < 1:1.1-2.1 +# check that they're not using old apache.conf +if grep -q '^Include conf\.d' /etc/apache/apache.conf; then + %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 +fi %files %defattr(644,root,root,755) +%doc *.html +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf %attr(755,root,root) %{_pkglibdir}/*