X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache1-mod_auth_samba.spec;h=2f7e929809afd76f9bd60ee39437e867767951ce;hb=9a8c546dae1e969abee137dbf385aa60161af322;hp=af68de15c657358578505849e7227ac29d25120e;hpb=f0c62a3883879dfc434395192b1472c2d016f3a5;p=packages%2Fapache1-mod_auth_samba.git diff --git a/apache1-mod_auth_samba.spec b/apache1-mod_auth_samba.spec index af68de1..2f7e929 100644 --- a/apache1-mod_auth_samba.spec +++ b/apache1-mod_auth_samba.spec @@ -1,10 +1,12 @@ +# 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/apxs +%define apxs /usr/sbin/apxs1 Summary: This is the samba authentication module for Apache Summary(pl): Modu³ uwierzytelnienia samba dla Apache -Name: apache-mod_%{mod_name} +Name: apache1-mod_%{mod_name} Version: 1.1 -Release: 6 +Release: 3 Epoch: 1 License: GPL Group: Networking/Daemons @@ -13,16 +15,19 @@ Source0: http://dl.sourceforge.net/modauthsamba/mod_%{mod_name}-%{version}.tar.g Patch0: %{name}-symbol_fix.patch URL: http://modauthsamba.sourceforge.net/ BuildRequires: %{apxs} -BuildRequires: apache(EAPI)-devel +BuildRequires: apache1-devel >= 1.3.33-2 BuildRequires: gdbm-devel BuildRequires: pam-devel BuildRequires: pam-pam_smb -Requires(post,preun): %{apxs} -Requires: apache(EAPI) +Requires(triggerpostun): %{apxs} +Requires: apache1 >= 1.3.33-2 Requires: pam-pam_smb +Obsoletes: apache-mod_%{mod_name} <= %{epoch}:%{version} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _pkglibdir %(%{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 @@ -42,28 +47,36 @@ uwierzytelnianie klient %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 -%{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 +if [ -f /var/lock/subsys/apache ]; then + /etc/rc.d/init.d/apache restart 1>&2 fi -%preun +%postun if [ "$1" = "0" ]; then - %{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 + if [ -f /var/lock/subsys/apache ]; then + /etc/rc.d/init.d/apache restart 1>&2 fi fi +%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}/*