]> git.pld-linux.org Git - packages/apache1-mod_auth_ldap.git/blobdiff - apache1-mod_auth_ldap.spec
- release 3
[packages/apache1-mod_auth_ldap.git] / apache1-mod_auth_ldap.spec
index afd90d2d8c3e43ea2bffaee1491a347f0bfa00f1..4ef61ec4c814ff97be35a5b5564288a7c136b8b8 100644 (file)
@@ -1,4 +1,5 @@
-%define        apxs    /usr/sbin/apxs
+%define        mod_name        auth_ldap
+%define apxs   /usr/sbin/apxs1
 Summary:       This is a LDAP authentication module for Apache
 Summary(cs):   Autentizaèní modul LDAP pro WWW server Apache
 Summary(da):   En LDAP-autenticeringsmodul for Apache
@@ -8,32 +9,35 @@ Summary(fr):  Module d'authentification LDAP pour Apache
 Summary(id):   Module LDAP authentication untuk Apache
 Summary(it):   Modulo di autenticazione LDPA per Apache
 Summary(ja):   Apache ÍѤΠLDAP Ç§¾Ú¥â¥¸¥å¡¼¥ë
-Summary(no):   En LDAP-autentiseringsmodul for Apache
-Summary(pl):   Modu³ autentykacji LDAP dla Apache
+Summary(nb):   En LDAP-autentiseringsmodul for Apache
+Summary(pl):   Modu³ uwierzytelnienia LDAP dla Apache
 Summary(pt):   Um módulo de autenticação de LDAP para o Apache
 Summary(pt_BR):        Este módulo provê autenticação LDAP para o Apache
 Summary(ru):   áÕÔÅÎÔÉÆÉËÁÃÉÏÎÎÙÊ ÍÏÄÕÌØ LDAP ÄÌÑ ÓÅÒ×ÅÒÁ Apache
 Summary(sl):   Avtentikacijski modul LDAP za Apache
 Summary(sv):   En LDAP autentiseringsmodul för Apache
 Summary(zh_CN):        ÕâÊÇÓÃÓÚ Apache µÄ LDAP Ñé֤ģ¿é
-Name:          apache-mod_auth_ldap
+Name:          apache1-mod_%{mod_name}
 Version:       1.6.0
-Release:       6
-License:       GPL
+Release:       3
+License:       BSD
 Group:         Networking/Daemons
 Source0:       http://www.rudedog.org/auth_ldap/auth_ldap-%{version}.tar.gz
+# Source0-md5: ff7de9027fe8852facd27be93462c5cc
 Patch0:                %{name}-makefile.patch
 URL:           http://www.rudedog.org/auth_ldap/
-BuildRequires: autoconf
-BuildRequires: apache(EAPI)-devel
-BuildRequires: openldap-devel
 BuildRequires: %{apxs}
-Prereq:                %{_sbindir}/apxs
-Prereq:                apache(EAPI)
-Prereq:                apache-mod_auth
+BuildRequires: apache1-devel >= 1.3.33-2
+BuildRequires: autoconf
+BuildRequires: openldap-devel >= 2.3.0
+Requires:      apache1 >= 1.3.33-2
+Requires:      apache1-mod_auth
+Requires(triggerpostun):       %{apxs}
+Obsoletes:     apache-mod_%{mod_name} <= %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _libexecdir     %{_prefix}/lib/apache
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 This is an authentication module for Apache that allows you to
@@ -79,14 +83,14 @@ inserimenti utente in una directory LDPA.
 ¥¨¥ó¥È¥ê¤ò»È¤Ã¤¿ HTTP ¥¯¥é¥¤¥¢¥ó¥È¤Îǧ¾Ú¤ò²Äǽ¤Ë¤¹¤ë¤¿¤á¤Îǧ¾Ú
 ¥â¥¸¥å¡¼¥ë¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
 
-%description -l no
+%description -l nb
 Denne pakken inneholder en autentiseringsmodul for webtjeneren Apache
 - med auth_ldap installert kan HTTP-klienter autentiseres mot
-brukerinformasjon i en LDAP-katalog.
+  brukerinformasjon i en LDAP-katalog.
 
 %description -l pl
-W pakiecie znajduje siê modu³ do Apache, który pozwala na autentykacjê
-klientów HTTP przy u¿yciu LDAP.
+W pakiecie znajduje siê modu³ do Apache, który pozwala na
+uwierzytelnianie klientów HTTP przy u¿yciu LDAP.
 
 %description -l pt
 Este pacote contém um módulo de autenticação para o servidor Web
@@ -116,7 +120,7 @@ LDAP-katalog.
 mv -f auth_ldap.c mod_auth_ldap.c
 
 %build
-autoconf
+%{__autoconf}
 %configure \
        --with-apxs=%{apxs} \
        --with-ldap-sdk=openldap \
@@ -126,29 +130,36 @@ autoconf
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
-gzip -9nf PROBLEMS
+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
-%{_sbindir}/apxs -e -a -n auth_ldap %{_libexecdir}/mod_auth_ldap.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
-       %{_sbindir}/apxs -e -A -n auth_ldap %{_libexecdir}/mod_auth_ldap.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.6.0-1.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 *.gz
-%attr(755,root,root) %{_libexecdir}/mod_auth_ldap.so
+%doc *.html PROBLEMS
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/mod_auth_ldap.so
This page took 0.518509 seconds and 4 git commands to generate.