]> git.pld-linux.org Git - packages/apache1-mod_dav.git/blobdiff - apache1-mod_dav.spec
fixed a small typo
[packages/apache1-mod_dav.git] / apache1-mod_dav.spec
index 71cd8bfba9e362f54525069fc242ed174d1f8641..b5bef6ecfea1de54ab389caca58be541f375d35d 100644 (file)
@@ -1,3 +1,4 @@
+%define        apxs    /usr/sbin/apxs
 Summary:       WebDAV module for the Apache Web server
 Summary(cs):   DAV modul pro WWW server Apache
 Summary(da):   En DAV-modul for Apache
@@ -16,27 +17,15 @@ Summary(uk):        
 %define                mod_name        dav
 Name:          apache-mod_%{mod_name}
 Version:       1.0.3
-Release:       1
+Release:       4
 License:       OSI Approved
 Group:         Networking/Daemons
-Group(cs):     Sí»ové/Démoni
-Group(da):     Netværks/Dæmoner
-Group(de):     Netzwerkwesen/Server
-Group(es):     Red/Servidores
-Group(fr):     Réseau/Serveurs
-Group(is):     Net/Púkar
-Group(it):     Rete/Demoni
-Group(no):     Nettverks/Daemoner
-Group(pl):     Sieciowe/Serwery
-Group(pt):     Rede/Servidores
-Group(ru):     óÅÔØ/äÅÍÏÎÙ
-Group(sl):     Omre¾ni/Stre¾niki
-Group(sv):     Nätverk/Demoner
-Group(uk):     íÅÒÅÖÁ/äÅÍÏÎÉ
 Source0:       http://www.webdav.org/mod_dav/mod_%{mod_name}-%{version}-%{apache_version}.tar.gz
+Source1:       %{name}.conf
 URL:           http://www.webdav.org/mod_dav/
-Prereq:                /usr/sbin/apxs
-BuildRequires: /usr/sbin/apxs
+Prereq:                %{_sbindir}/apxs
+BuildRequires: expat-devel
+BuildRequires: %{apxs}
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: apache(EAPI)-devel      >= %{apache_version}
@@ -44,7 +33,7 @@ Requires:     apache(EAPI)            >= %{apache_version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     mod_dav
 
-%define                _pkglibdir      %(%{_sbindir}/apxs -q LIBEXECDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
 
 %description
 mod_dav enables Apache to understand DAV protocol (extensions to
@@ -151,26 +140,34 @@ Fusion צ
 aclocal
 autoconf
 %configure \
-       --with-apxs=/usr/sbin/apxs
-%{__make} APXS=/usr/sbin/apxs
+       --with-apxs=%{apxs} \
+       --with-expat=%{_prefix}
+%{__make} APXS=%{apxs}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},/etc/httpd,/var/lock/mod_dav}
 
 install lib%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/mod_dav.conf
 
 gzip -9nf README CHANGES INSTALL
 
 %post
-/usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/lib%{mod_name}.so 1>&2
+%{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/lib%{mod_name}.so 1>&2
+if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_dav.conf" /etc/httpd/httpd.conf; then
+       echo "Include /etc/httpd/mod_dav.conf" >> /etc/httpd/httpd.conf
+fi
 if [ -f /var/lock/subsys/httpd ]; then
        %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-       /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/lib%{mod_name}.so 1>&2
+       %{_sbindir}/apxs -e -A -n %{mod_name} %{_pkglibdir}/lib%{mod_name}.so 1>&2
+       grep -v "^Include.*mod_dav.conf" /etc/httpd/httpd.conf > \
+               /etc/httpd/httpd.conf.tmp
+       mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
        if [ -f /var/lock/subsys/httpd ]; then
                /etc/rc.d/init.d/httpd restart 1>&2
        fi
@@ -182,4 +179,6 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc *.gz LICENSE.html
+%config(noreplace) /etc/httpd/mod_dav.conf
 %attr(755,root,root) %{_pkglibdir}/*
+%attr(750,http,http) /var/lock/mod_dav
This page took 0.098986 seconds and 4 git commands to generate.