]> git.pld-linux.org Git - packages/apache1-mod_dav.git/blobdiff - apache1-mod_dav.spec
- adapterized and made spec %%debug ready or using %%rpm*flags macros
[packages/apache1-mod_dav.git] / apache1-mod_dav.spec
index 33cac7faeebf6eb9e34086f735bafd3e6154bb3e..cdf6df64d7d2e193a19b5698a4bb9b7e9f93fe3d 100644 (file)
@@ -1,7 +1,7 @@
-%define                apache_version  1.3.6
-%define                mod_name        dav
 Summary:       WebDAV module for the Apache Web server
 Summary(pl):   Modu³ WebDAV dla webserwera Apache
+%define                apache_version  1.3.6
+%define                mod_name        dav
 Name:          apache-mod_%{mod_name}
 Version:       1.0.2
 Release:       1
@@ -9,11 +9,16 @@ Group:                Networking/Daemons
 Group(de):     Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 License:       OSI Approved
-Source0:       http://www.webdav.org/mod_%{mod_name}/mod_%{mod_name}-%{version}-%{apache_version}.tar.gz
-URL:           http://www.webdav.org/mod_%{mod_name}
+Source0:       http://www.webdav.org/mod_dav/mod_%{mod_name}-%{version}-%{apache_version}.tar.gz
+URL:           http://www.webdav.org/mod_dav/
+Prereq:                /usr/sbin/apxs
+BuildRequires: /usr/sbin/apxs
+BuildRequires: expat-devel
 BuildRequires: apache(EAPI)-devel      >= %{apache_version}
 Requires:      apache(EAPI)            >= %{apache_version}
+Requires:      expat
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Obsoletes:     mod_dav
 
 %define                _pkglibdir      %(%{_sbindir}/apxs -q LIBEXECDIR)
 
@@ -34,26 +39,39 @@ to tak
 plikami i katalogami serwera Web, oraz ich w³±¶ciwo¶ciami.
 
 %prep 
-%setup -q -n mod_%{mod_name}-%{apache_version}
+%setup -q -n mod_%{mod_name}-%{version}-%{apache_version}
 
 %build
-CFLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O0 -g} %{?debug:-g -O0}"; export CFLAGS
-%configure --with-apxs=%{_sbindir}/apxs --with-expat=%{_prefix}
+%configure \
+       --with-apxs=%{_sbindir}/apxs
 %{__make} APXS=%{_sbindir}/apxs
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_pkglibdir}
-cp *.so $RPM_BUILD_ROOT%{_pkglibdir}
-%{!?debug:strip $RPM_BUILD_ROOT%{_pkglibdir}/*}
 
-%{_pkglibdir}/apache/libdav.so
-%doc README CHANGES INSTALL LICENSE.html
+install lib%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/
+
+gzip -9nf README CHANGES INSTALL
+
+%post
+%{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/lib%{mod_name}.so 1>&2
+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
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd restart 1>&2
+       fi
+fi
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc *.gz
+%doc *.gz LICENSE.html
 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.05231 seconds and 4 git commands to generate.