aboutsummaryrefslogtreecommitdiff
path: root/deskutils/horde-nag
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2006-01-06 00:38:13 +0000
committerThierry Thomas <thierry@FreeBSD.org>2006-01-06 00:38:13 +0000
commite23ee358fa1ac94e411715abac088791dc154c19 (patch)
tree2f2d07d89e8f9b0b1bbbaa61fc0a3c53d8b1308c /deskutils/horde-nag
parent8931540e0ace91aa22d2f957ccaefa11eb78adca (diff)
downloadports-e23ee358fa1ac94e411715abac088791dc154c19.tar.gz
ports-e23ee358fa1ac94e411715abac088791dc154c19.zip
Notes
Diffstat (limited to 'deskutils/horde-nag')
-rw-r--r--deskutils/horde-nag/Makefile19
-rw-r--r--deskutils/horde-nag/files/pkg-deinstall.in (renamed from deskutils/horde-nag/pkg-deinstall)2
-rw-r--r--deskutils/horde-nag/pkg-plist2
3 files changed, 15 insertions, 8 deletions
diff --git a/deskutils/horde-nag/Makefile b/deskutils/horde-nag/Makefile
index 5928f9390e49..378160e55120 100644
--- a/deskutils/horde-nag/Makefile
+++ b/deskutils/horde-nag/Makefile
@@ -25,11 +25,12 @@ COMMENT= Nag is a simple, multiuser task list manager
RUN_DEPENDS= ${LOCALBASE}/${LHORDEDIR}/rpc.php:${PORTSDIR}/www/horde
NO_BUILD= yes
-USE_REINPLACE= yes
+USE_APACHE= 1.3+ # needed to test APACHE_VERSION
-PLIST_SUB= NAGDIR=${LNAGDIR}
+PLIST_SUB= NAGDIR=${LNAGDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
-SUB_FILES= pkg-message
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+SUB_FILES= pkg-message pkg-deinstall
SUB_LIST= NAGDIR=${NAGDIR}
DOCS= COPYING README docs/CHANGES docs/CREDITS docs/INSTALL \
@@ -43,11 +44,17 @@ LNAGDIR?= ${LHORDEDIR}/nag
NAGDIR= ${PREFIX}/${LNAGDIR}
CONFDIR= ${NAGDIR}/config
+.include <bsd.port.pre.mk>
+
+.if ${APACHE_VERSION} >= 20
+HORDE_INC= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}/Includes
+.else
HORDE_INC= ${LOCALBASE}/etc/horde
+.endif
pre-configure:
@${SED} -e "s:/home/httpd/html/horde/nag:${NAGDIR}:g" \
- ${FILESDIR}/httpd.conf.nag > ${WRKDIR}/httpd.conf.nag
+ ${FILESDIR}/httpd.conf.nag > ${WRKDIR}/httpd-nag.conf
do-install:
@${MKDIR} ${NAGDIR}
@@ -62,7 +69,7 @@ do-install:
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${NAGDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
- @${INSTALL_DATA} ${WRKDIR}/httpd.conf.nag ${HORDE_INC}
+ @${INSTALL_DATA} ${WRKDIR}/httpd-nag.conf ${HORDE_INC}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
@@ -76,4 +83,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/deskutils/horde-nag/pkg-deinstall b/deskutils/horde-nag/files/pkg-deinstall.in
index 266600fc1a29..8f85e546f5d4 100644
--- a/deskutils/horde-nag/pkg-deinstall
+++ b/deskutils/horde-nag/files/pkg-deinstall.in
@@ -9,7 +9,7 @@ if [ x$2 != xDEINSTALL ]; then
fi
if [ -z "${PACKAGE_BUILDING}" ]; then
- for cf in `ls ${PKG_PREFIX}/www/horde/nag/config/*php`; do
+ for cf in `ls %%NAGDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
diff --git a/deskutils/horde-nag/pkg-plist b/deskutils/horde-nag/pkg-plist
index 14695a512690..f8516bc705b9 100644
--- a/deskutils/horde-nag/pkg-plist
+++ b/deskutils/horde-nag/pkg-plist
@@ -1,4 +1,4 @@
-etc/horde/httpd.conf.nag
+%%HORDE_INC%%/httpd-nag.conf
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/CREDITS