aboutsummaryrefslogtreecommitdiff
path: root/deskutils/kronolith/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'deskutils/kronolith/Makefile')
-rw-r--r--deskutils/kronolith/Makefile76
1 files changed, 41 insertions, 35 deletions
diff --git a/deskutils/kronolith/Makefile b/deskutils/kronolith/Makefile
index 1532103513d9..6f576cc8d166 100644
--- a/deskutils/kronolith/Makefile
+++ b/deskutils/kronolith/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kronolith
-PORTVERSION= 1.1.2
+PORTVERSION= 2.0
CATEGORIES= deskutils www
MASTER_SITES= ftp://ftp.horde.org/pub/kronolith/ \
ftp://ftp.planetmirror.com/pub/horde/kronolith/ \
@@ -17,44 +17,55 @@ MASTER_SITES= ftp://ftp.horde.org/pub/kronolith/ \
ftp://ftp.nl.horde.org/mirror/horde-ftp/pub/kronolith/ \
ftp://ftp.uk.horde.org/mirrors/ftp.horde.org/pub/kronolith/ \
http://ftp.horde.org/pub/kronolith/
+DISTNAME= ${PORTNAME}-h3-${PORTVERSION}
MAINTAINER= thierry@FreeBSD.org
COMMENT= Kronolith is the Horde calendar application
-RUN_DEPENDS= ${LOCALBASE}/www/horde/imp/index.php:${PORTSDIR}/mail/imp3
+#----------------------------------------------------------------------------
+# You may define this option:
+#
+# - WITHOUT_MCAL: you won't use the MCAL driver but a database backend
+# (only for PHP4).
+#
+#----------------------------------------------------------------------------
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+RUN_DEPENDS+= ${LOCALBASE}/www/horde/rpc.php:${PORTSDIR}/www/horde
NO_BUILD= yes
-USE_PHP= mcal
+USE_PHP= yes # modules set by Horde, but needed to get PHP_VER
USE_REINPLACE= yes
-.if defined(WITH_APACHE2)
-HTPASSWD= ${LOCALBASE}/sbin/htpasswd
-.else
-HTPASSWD= ${LOCALBASE}/bin/htpasswd
-.endif
-
-REINPLACE_ARGS= -i.beforeKronolith
+REINPLACE_ARGS= -i ""
DOCS= COPYING README docs/CHANGES docs/CREDITS docs/INSTALL \
- docs/RELEASE_NOTES
-CONFFILE= conf.php html.php keywords.php menu.php prefs.php
-SUB_DIRS= config graphics lib locale po scripts templates util
+ docs/RELEASE_NOTES docs/TODO docs/UPGRADING
+CONFFILE= keywords.php menu.php prefs.php
+SUB_DIRS= config lib locale po scripts templates themes
LHORDEDIR?= www/horde
LKRONOLITHDIR?= ${LHORDEDIR}/kronolith
-PLIST_SUB= HORDEDIR=${LHORDEDIR} KRONOLITHDIR=${LKRONOLITHDIR}
+PLIST_SUB= KRONOLITHDIR=${LKRONOLITHDIR}
+PKGMESSAGE= ${WRKDIR}/pkg-message
-HORDEDIR= ${PREFIX}/${LHORDEDIR}
KRONOLITHDIR= ${PREFIX}/${LKRONOLITHDIR}
CONFDIR= ${KRONOLITHDIR}/config
VAR_CAL= /var/calendar
HORDE_INC= ${LOCALBASE}/etc/horde
-post-patch:
- @${RM} ${WRKSRC}/config/conf.php.dist.orig
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/sbin/htpasswd)
+HTPASSWD= ${LOCALBASE}/sbin/htpasswd
+.else
+HTPASSWD= ${LOCALBASE}/bin/htpasswd
+.endif
+
+pre-configure:
+ @${RM} ${WRKSRC}/config/conf.xml.orig
+ @${SED} -e "s:/home/httpd/html/horde/kronolith:${KRONOLITHDIR}:" \
+ ${FILESDIR}/httpd.conf.kronolith > ${WRKDIR}/httpd.conf.kronolith
do-install:
@${MKDIR} ${KRONOLITHDIR}
@@ -62,22 +73,14 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${KRONOLITHDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${KRONOLITHDIR}
- @${MKDIR} ${KRONOLITHDIR}/scripts
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
- @${CHOWN} -R www:www ${KRONOLITHDIR}
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${KRONOLITHDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
- @${CP} -p ${FILESDIR}/httpd.conf.kronolith ${HORDE_INC}
- @${REINPLACE_CMD} -e "s:/home/httpd/html/horde/kronolith:${KRONOLITHDIR}:g" \
- ${HORDE_INC}/httpd.conf.kronolith
- @${RM} ${HORDE_INC}/httpd.conf.kronolith.beforeKronolith
- @${REINPLACE_CMD} -e "s://UNCOMMENTWHENINSTKRONOLITH::" \
- ${HORDEDIR}/config/registry.php
- @${CP} -p ${HORDEDIR}/config/registry.php \
- ${HORDEDIR}/config/registry.php.afterKronolith
+ @${INSTALL_DATA} ${WRKDIR}/httpd.conf.kronolith ${HORDE_INC}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
@@ -87,6 +90,7 @@ do-install:
.endif
post-install:
+.if !defined(WITHOUT_MCAL) && (${PHP_VER} == 4)
@if [ ! -d ${VAR_CAL} ]; then \
${ECHO_MSG} "===> Creating ${VAR_CAL}" ; \
${MKDIR} ${VAR_CAL} ; \
@@ -98,21 +102,23 @@ post-install:
${ECHO} -n "Please enter a password for www's calendar: " ; \
(read PASSCAL; \
${HTPASSWD} -bc ${LOCALBASE}/etc/mpasswd www $${PASSCAL}; \
- ${REINPLACE_CMD} -e "s:%%PASSCAL%%:$${PASSCAL}:" ${CONFDIR}/conf.php) \
+ ${REINPLACE_CMD} -e "s:%%PASSCAL%%:$${PASSCAL}:" ${CONFDIR}/conf.xml) \
elif ! ${GREP} -q -e "^www" ${LOCALBASE}/etc/mpasswd ; then \
${ECHO_MSG} "===> Adding www into ${LOCALBASE}/etc/mpasswd" ; \
${ECHO} -n "Please enter a password for www's calendar: " ; \
(read PASSCAL; \
${HTPASSWD} -b ${LOCALBASE}/etc/mpasswd www $${PASSCAL} ; \
- ${REINPLACE_CMD} -e "s:%%PASSCAL%%:$${PASSCAL}:" ${CONFDIR}/conf.php) \
+ ${REINPLACE_CMD} -e "s:%%PASSCAL%%:$${PASSCAL}:" ${CONFDIR}/conf.xml) \
else \
- ${REINPLACE_CMD} -e "s:%%PASSCAL%%:www_cal_password:" ${CONFDIR}/conf.php ; \
+ ${REINPLACE_CMD} -e "s:%%PASSCAL%%:www_cal_password:" ${CONFDIR}/conf.xml ; \
fi
- @${RM} ${CONFDIR}/conf.php.beforeKronolith
+. endif
.endif
+ @${SED} -e "s:%%KRONOLITHDIR%%:${KRONOLITHDIR}:g;s:%%DOCSDIR%%:${DOCSDIR}:g" \
+ -e "s:%%LOCALBASE%%:${LOCALBASE}:" < ${FILESDIR}/pkg-message.in \
+ > ${PKGMESSAGE}
@${ECHO_MSG}
- @${SED} -e "s:%%KRONOLITHDIR%%:${KRONOLITHDIR}:g;s:%%PORTSDIR%%:${PORTSDIR}:g" \
- -e "s:%%CONFDIR%%:${CONFDIR}:g;s:%%LOCALBASE%%:${LOCALBASE}:" ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>