summaryrefslogtreecommitdiff
path: root/www/mod_dav
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2004-08-27 16:13:52 +0000
committerVolker Stolz <vs@FreeBSD.org>2004-08-27 16:13:52 +0000
commitfdb2cb4d49056d8d977db80514af20dc223e771e (patch)
tree873d8649312f78e994d8fe683661d7fbd402a957 /www/mod_dav
parentUTF-8-version of japanese/edict dictionary files (diff)
Re-package:
- Drop pkg-plist in favour of PLIST_FILES - Use pkg-message instead of post-install-target - Synchronize installation from port and package: The module wasn't enabled after installing from the package - Create files necessary for locking to work out-of-the-box Approved by: clement
Notes
Notes: svn path=/head/; revision=117434
Diffstat (limited to 'www/mod_dav')
-rw-r--r--www/mod_dav/Makefile25
-rw-r--r--www/mod_dav/files/pkg-message.in10
-rw-r--r--www/mod_dav/pkg-install23
-rw-r--r--www/mod_dav/pkg-plist2
4 files changed, 48 insertions, 12 deletions
diff --git a/www/mod_dav/Makefile b/www/mod_dav/Makefile
index 77e0dedb5bc6..92dd87df2534 100644
--- a/www/mod_dav/Makefile
+++ b/www/mod_dav/Makefile
@@ -18,6 +18,10 @@ COMMENT= An Apache module that provides DAV capabilities
# This port will work with the following version of Apache and anything newer.
APACHE_VERSION= 1.3.6
+PKGDEINSTALL= ${PKGINSTALL}
+PKGMESSAGE= ${WRKSRC}/pkg-message
+PLIST_FILES= etc/apache/apache.conf.mod_dav libexec/apache/libdav.so
+
USE_APACHE= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
@@ -43,16 +47,17 @@ pre-everything::
@/bin/sleep 5
.endif
-post-install:
+do-install:
+ BINMODE=755 ${INSTALL_PROGRAM} ${WRKSRC}/libdav.so ${PREFIX}/libexec/apache
${INSTALL_DATA} ${FILESDIR}/apache.conf.mod_dav ${PREFIX}/etc/apache
- @${ECHO_MSG} "*******************************************************"
- @${ECHO_MSG} "* Please review the mod_dav configuration in the main"
- @${ECHO_MSG} "* Apache configuration file."
- @${ECHO_MSG} "* ${PREFIX}/etc/apache/httpd.conf"
- @${ECHO_MSG} "*"
- @${ECHO_MSG} "* Look at the file ${PREFIX}/etc/apache/apache.conf.mod_dav"
- @${ECHO_MSG} "* for indications on what to do."
- @${ECHO_MSG} "*"
- @${ECHO_MSG} "*******************************************************"
+
+post-install:
+.if !defined(PACKAGE_BUILDING)
+ @${SETENV} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+ @${SED} -e 's+%%PREFIX%%+${PREFIX}+' ${FILESDIR}/pkg-message.in \
+ > ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/www/mod_dav/files/pkg-message.in b/www/mod_dav/files/pkg-message.in
new file mode 100644
index 000000000000..0b5dafa92c9a
--- /dev/null
+++ b/www/mod_dav/files/pkg-message.in
@@ -0,0 +1,10 @@
+*******************************************************
+* Please review the mod_dav configuration in the main
+* Apache configuration file:
+* %%PREFIX%%/etc/apache/httpd.conf
+*
+* Look at the file %%PREFIX%%/etc/apache/apache.conf.mod_dav
+* for indications on what to do. The default lock database
+* has already been created in /var/db/DAVLock.{dir,pag}.
+*
+*******************************************************
diff --git a/www/mod_dav/pkg-install b/www/mod_dav/pkg-install
new file mode 100644
index 000000000000..1ace7c99302b
--- /dev/null
+++ b/www/mod_dav/pkg-install
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+CHMOD=/bin/chmod
+CHOWN=/usr/sbin/chown
+TOUCH=/usr/bin/touch
+
+case $2 in
+POST-INSTALL)
+ ${PKG_PREFIX}/sbin/apxs -e -a -n dav libdav.so
+ for i in DAVLock.dir DAVLock.pag ; do
+ ${TOUCH} /var/db/$i
+ ${CHOWN} ${WWWOWN}:${WWWGRP} /var/db/$i
+ ${CHMOD} 640 /var/db/$i
+ done
+ ;;
+POST-DEINSTALL)
+ ${PKG_PREFIX}/sbin/apxs -e -A -n dav libdav.so
+ for i in DAVLock.dir DAVLock.pag ; do
+ rm -f /var/db/$i
+ done
+ ;;
+esac
+exit 0
diff --git a/www/mod_dav/pkg-plist b/www/mod_dav/pkg-plist
deleted file mode 100644
index 30d891e7a204..000000000000
--- a/www/mod_dav/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-etc/apache/apache.conf.mod_dav
-libexec/apache/libdav.so