aboutsummaryrefslogtreecommitdiff
path: root/mail/horde4-turba
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 /mail/horde4-turba
parent8931540e0ace91aa22d2f957ccaefa11eb78adca (diff)
downloadports-e23ee358fa1ac94e411715abac088791dc154c19.tar.gz
ports-e23ee358fa1ac94e411715abac088791dc154c19.zip
Notes
Diffstat (limited to 'mail/horde4-turba')
-rw-r--r--mail/horde4-turba/Makefile20
-rw-r--r--mail/horde4-turba/files/pkg-deinstall.in (renamed from mail/horde4-turba/pkg-deinstall)2
-rw-r--r--mail/horde4-turba/pkg-plist2
3 files changed, 16 insertions, 8 deletions
diff --git a/mail/horde4-turba/Makefile b/mail/horde4-turba/Makefile
index 0b2ca270102e..81bfb5cbe144 100644
--- a/mail/horde4-turba/Makefile
+++ b/mail/horde4-turba/Makefile
@@ -38,6 +38,7 @@ USE_PHP= ldap
.endif
NO_BUILD= yes
+USE_APACHE= 1.3+ # needed to test APACHE_VERSION
USE_REINPLACE= yes
REINPLACE_ARGS= -i ""
@@ -49,15 +50,16 @@ SUB_DIRS= config lib locale po scripts templates themes
LHORDEDIR?= www/horde
LTURBADIR?= ${LHORDEDIR}/turba
-PLIST_SUB= TURBADIR=${LTURBADIR}
+PLIST_SUB= TURBADIR=${LTURBADIR} 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= TURBADIR=${TURBADIR} CONFDIR=${CONFDIR}
TURBADIR= ${PREFIX}/${LTURBADIR}
CONFDIR= ${TURBADIR}/config
-HORDE_INC= ${LOCALBASE}/etc/horde
+.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/sbin/imspd)
WITH_IMSP= yes
@@ -66,10 +68,16 @@ WITH_IMSP= yes
RUN_DEPENDS+= imspd:${PORTSDIR}/databases/cyrus-imspd
.endif
+.if ${APACHE_VERSION} >= 20
+HORDE_INC= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}/Includes
+.else
+HORDE_INC= ${LOCALBASE}/etc/horde
+.endif
+
pre-configure:
@${RM} ${WRKSRC}/config/sources.php.dist.orig
@${SED} -e "s:/home/httpd/html/horde/turba:${TURBADIR}:g" \
- ${FILESDIR}/httpd.conf.turba > ${WRKDIR}/httpd.conf.turba
+ ${FILESDIR}/httpd.conf.turba > ${WRKDIR}/httpd-turba.conf
@${REINPLACE_CMD} -e "s:/usr/bin/ldapadd:${LOCALBASE}/bin/ldapadd:" \
${WRKSRC}/scripts/ldap/addou.pl
.if defined(WITH_IMSP)
@@ -89,7 +97,7 @@ do-install:
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${TURBADIR}
@${CHMOD} -R o-rwx ${CONFDIR}
- @${INSTALL_DATA} ${WRKDIR}/httpd.conf.turba ${HORDE_INC}
+ @${INSTALL_DATA} ${WRKDIR}/httpd-turba.conf ${HORDE_INC}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
@@ -103,4 +111,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/horde4-turba/pkg-deinstall b/mail/horde4-turba/files/pkg-deinstall.in
index b0a141eef091..afe8f9215da2 100644
--- a/mail/horde4-turba/pkg-deinstall
+++ b/mail/horde4-turba/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/turba/config/*php`; do
+ for cf in `ls %%TURBADIR%%/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/mail/horde4-turba/pkg-plist b/mail/horde4-turba/pkg-plist
index 48455454ad34..fdb89c479187 100644
--- a/mail/horde4-turba/pkg-plist
+++ b/mail/horde4-turba/pkg-plist
@@ -167,7 +167,7 @@
%%TURBADIR%%/themes/graphics/turba.png
%%TURBADIR%%/themes/screen.css
%%TURBADIR%%/vcard.php
-etc/horde/httpd.conf.turba
+%%HORDE_INC%%/httpd-turba.conf
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%TURBADIR%%/lib/Block
@dirrm %%TURBADIR%%/lib/Driver