%define name mod_dav %define version 1.0.3 %define release 5mdk %define srcver %{version}-1.3.6 %define apache_version 1.3.23 %define apachebase %{_sysconfdir}/httpd %define apachecontent /var/www/html %define expat_version 1.95.2 Summary: DAV module for Apache Name: %{name} Version: %{version} Release: %{release} Source0: http://www.webdav.org/mod_dav/%{name}-%{srcver}.tar.bz2 URL: http://www.webdav.org/mod_dav/ Source1: mod_dav.conf Patch: mod_dav-shared-expat.patch.bz2 License: Apache License Group: System/Servers BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} Requires: apache = %{apache_version} Requires: libexpat1_95 BuildRequires: apache = %{apache_version} BuildRequires: apache-devel = %{apache_version} BuildRequires: libexpat1_95-devel %description mod_dav enables Apache to understand DAV protocol (extensions to HTTP). DAV stands for "Distributed Authoring and Versioning", and is defined by RFC 2518. DAV is intended to replace proprietary authoring protocols such as those used by Frontpage or NetObjects' Fusion, but is also a complete set of protocols for manipulating a webserver's files and directories, and their properties. %prep %setup -q -n %{name}-%{srcver} %patch -p1 %build #Do not use serverbuild here... #Use same flags as the rest of Apache #Otherwise it segfaults #%serverbuild #%configure --with-apxs=%{_sbindir}/apxs #%make ./configure make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir}/apache-extramodules mkdir -p $RPM_BUILD_ROOT%{apachebase}/conf/addon-modules # Files installation install -m 755 libdav.so $RPM_BUILD_ROOT%{_libdir}/apache-extramodules install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{apachebase}/conf/addon-modules # Lock installation mkdir -p $RPM_BUILD_ROOT/var/lock/mod_dav chmod o-rwx $RPM_BUILD_ROOT/var/lock/mod_dav # Doc installation mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} cp README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/mod_dav.txt cp CHANGES INSTALL LICENSE.html $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} # Doc linking mkdir -p $RPM_BUILD_ROOT%{apachecontent}/addon-modules pushd $RPM_BUILD_ROOT%{apachecontent}/addon-modules ln -s ../../../..%{_docdir}/%{name}-%{version} %{name} popd %post if [ $1 = "1" ]; then #We're in Install mode, add module to the config files for config in %{apachebase}/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then %{_sbindir}/advxaddmod $config \ extramodules/libdav.so mod_dav.c dav_module \ define=HAVE_DAV addconf=conf/addon-modules/mod_dav.conf fi done if [ -x %{_sbindir}/AESctl ]; then %{_sbindir}/AESctl update;fi fi if [ $1 -gt 1 ]; then #We're in *upgrade mode*. Since we can't be sure the configuration files #are sane, remove module from the conf files to clean them, re-add again #in a way that the older module we're replacing won't try to erase (the #post scripts were broken on some packages), and finally clean the module #specific config file so it's compatible with the upgrade. for config in %{apachebase}/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then %{_sbindir}/advxdelmod $config \ extramodules/libdav.so mod_dav.c dav_module \ define=HAVE_DAV addconf=conf/addon-modules/mod_dav.conf fi if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then %{_sbindir}/advxaddmod $config \ extramodules/libdav.so mod_dav.c dav_module \ define=HAVE_DAV addconf=conf/addon-modules/mod_dav.conf fi done if [ -x %{_sbindir}/AESctl ]; then %{_sbindir}/AESctl update;fi fi %postun if [ $1 = "0" ]; then for config in %{apachebase}/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then %{_sbindir}/advxdelmod $config \ extramodules/libdav.so mod_dav.c dav_module \ define=HAVE_DAV addconf=conf/addon-modules/mod_dav.conf fi done if [ -x %{_sbindir}/AESctl ]; then %{_sbindir}/AESctl update;fi fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/apache-extramodules/libdav.so %dir %{_docdir}/%{name}-%{version} %doc %{_docdir}/%{name}-%{version}/* %config(noreplace) %{apachebase}/conf/addon-modules/mod_dav.conf %attr(-,apache,apache) %dir /var/lock/mod_dav %{apachecontent}/addon-modules/* %changelog * Mon Mar 04 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.0.3-5mdk - Recompile for new expat policy (ie, always use dynamic library instead of each apache application linking its static one. - Fix segfaults * Wed Feb 06 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.0.3-4mdk - Add documentation %{apachecontent}/addon-modules * Wed Feb 06 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.0.3-3mdk - Add apache in the Requires. - Add expat in the Requires and BuildRequires. - Remake post and postun to respect apache modules installation standard. - Change module folder in config file to reflect changes in package. * Mon Feb 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.0.3-2mdk - Rebuild against last apache. - Make setup quiet * Thu Nov 8 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.0.3-1mdk - 1.0.3 * Tue Oct 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.0.2-3mdk - s/Copyright/License/. - apache 1.3.22. * Mon Oct 1 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.0.2-2mdk - append a trailing / to the default lock dir. * Sun Sep 30 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.0.2-1mdk - first Mandrake Linux version # end of file