Improvements to mod_dav [patch]

Volker Stolz vs at freebsd.org
Thu Aug 26 04:00:45 PDT 2004


Please review:
- Remove pkg-plist in favour of PLIST_FILES (oh, yeah, great ;)
- Automatically follow instructions in apache.conf.mod_dav to setup
   the two files req'd for locking to work.

Cheers,
  Volker
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
L-Attriwutgrammatik
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /usr/freebsdcvs/cvs-ports/ports/www/mod_dav/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	18 Aug 2004 16:21:49 -0000	1.14
+++ Makefile	26 Aug 2004 10:15:05 -0000
@@ -18,6 +18,9 @@
 # This port will work with the following version of Apache and anything newer.
 APACHE_VERSION=	1.3.6
 
+PKGDEINSTALL=	${PKGINSTALL}
+PLIST_FILES=	etc/apache/apache.conf.mod_dav libexec/apache/libdav.so
+
 USE_APACHE=	yes
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX} \
@@ -45,6 +48,9 @@
 
 post-install:
 	${INSTALL_DATA} ${FILESDIR}/apache.conf.mod_dav ${PREFIX}/etc/apache
+.if !defined(PACKAGE_BUILDING)
+	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
 	@${ECHO_MSG} "*******************************************************"
 	@${ECHO_MSG} "* Please review the mod_dav configuration in the main"
 	@${ECHO_MSG} "* Apache configuration file."
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ pkg-install	26 Aug 2004 10:17:06 -0000
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+USER=www
+GROUP=${USER}
+CHMOD=/bin/chmod
+CHOWN=/usr/sbin/chown
+TOUCH=/usr/bin/touch
+
+case $2 in
+POST-INSTALL)
+	for i in DAVLock.dir DAVLock.pag ; do
+	  ${TOUCH} /var/db/$i
+	  ${CHOWN} ${USER}:${GROUP} /var/db/$i
+	  ${CHMOD} 640 /var/db/$i
+	done
+	;;
+POST-DEINSTALL)
+	for i in DAVLock.dir DAVLock.pag ; do
+	  rm -f /var/db/$i
+	done
+	;;
+esac
+exit 0


More information about the freebsd-apache mailing list