2003-01-17 04:09:01 +00:00
|
|
|
# Ports collection makefile for: Jonah
|
|
|
|
# Date created: Mon Dec 17, 2001
|
|
|
|
# Whom: Thierry Thomas <thierry@pompo.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= jonah
|
|
|
|
PORTVERSION= 0.0.3.020629
|
2004-02-04 05:10:27 +00:00
|
|
|
PORTREVISION= 1
|
2003-01-17 04:09:01 +00:00
|
|
|
CATEGORIES= www
|
|
|
|
MASTER_SITES= http://pompo.net/horde/jonah/
|
|
|
|
|
|
|
|
MAINTAINER= thierry@pompo.net
|
2003-02-21 14:08:24 +00:00
|
|
|
COMMENT= Jonah is a portal and content collection system
|
2003-01-17 04:09:01 +00:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
|
|
|
|
|
|
RUN_DEPENDS= ${LOCALBASE}/www/horde/index.php:${PORTSDIR}/www/horde2 \
|
2004-03-30 17:43:43 +00:00
|
|
|
${LOCALBASE}/bin/php:${PORTSDIR}/lang/php4-horde
|
|
|
|
|
|
|
|
IGNORE= "Does not run with Horde 2.x"
|
2003-01-17 04:09:01 +00:00
|
|
|
|
|
|
|
NO_BUILD= yes
|
|
|
|
USE_REINPLACE= yes
|
|
|
|
|
|
|
|
REINPLACE_ARGS= -i.beforeJonah
|
|
|
|
|
|
|
|
DOCS= COPYING README docs/CHANGES docs/CREDITS docs/HELP \
|
|
|
|
docs/INSTALL
|
|
|
|
CONFFILE= channels.php conf.php html.php
|
|
|
|
SUB_DIRS= config graphics lib scripts templates
|
|
|
|
|
|
|
|
LHORDEDIR?= www/horde
|
|
|
|
LJONAHDIR?= ${LHORDEDIR}/jonah
|
|
|
|
RSS_HTML?= /var/jonah
|
|
|
|
PHPSADIR?= ${LOCALBASE}/etc/php.standalone
|
|
|
|
|
|
|
|
PLIST_SUB= HORDEDIR=${LHORDEDIR} JONAHDIR=${LJONAHDIR}
|
|
|
|
|
|
|
|
HORDEDIR= ${PREFIX}/${LHORDEDIR}
|
|
|
|
JONAHDIR= ${PREFIX}/${LJONAHDIR}
|
|
|
|
CONFDIR= ${JONAHDIR}/config
|
|
|
|
|
|
|
|
HORDE_INC= ${LOCALBASE}/etc/horde
|
|
|
|
HORDE_CNF= ${HORDEDIR}/config/horde.php
|
|
|
|
PHPSA_INI= ${PHPSADIR}/php.ini
|
|
|
|
|
|
|
|
pre-install:
|
2004-03-30 17:43:43 +00:00
|
|
|
@if ! ${LDCONFIG} -r | ${GREP} -q -e "expat.5"; then \
|
2003-01-17 04:09:01 +00:00
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${ECHO_MSG} "Please configure PHP with XML support." ; \
|
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${FALSE} ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${JONAHDIR}
|
|
|
|
.for REP in ${SUB_DIRS}
|
|
|
|
@${CP} -Rp ${WRKSRC}/${REP} ${JONAHDIR}
|
|
|
|
.endfor
|
|
|
|
@${CP} -p ${WRKSRC}/*.php ${JONAHDIR}
|
|
|
|
@${MV} ${JONAHDIR}/scripts/cli-backend.php ${PREFIX}/bin
|
|
|
|
.for FILE in ${CONFFILE}
|
|
|
|
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
|
|
|
|
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
|
|
|
|
fi
|
|
|
|
.endfor
|
|
|
|
@${REINPLACE_CMD} -e "s:/var/jonah:${RSS_HTML}:" ${CONFDIR}/conf.php
|
|
|
|
@${RM} ${CONFDIR}/conf.php.beforeJonah
|
|
|
|
@${REINPLACE_CMD} -e "s:%%JONAHDIR%%:'${JONAHDIR}':" \
|
|
|
|
${PREFIX}/bin/cli-backend.php
|
|
|
|
@${RM} ${PREFIX}/bin/cli-backend.php.beforeJonah
|
|
|
|
@${CHOWN} -R www:www ${JONAHDIR}
|
|
|
|
@${CHMOD} -R o-rwx ${CONFDIR}
|
|
|
|
@${CP} -p ${FILESDIR}/httpd.conf.jonah ${HORDE_INC}
|
|
|
|
@${REINPLACE_CMD} -e "s:/home/httpd/html/horde/jonah:${JONAHDIR}:g" \
|
|
|
|
${HORDE_INC}/httpd.conf.jonah
|
|
|
|
@${RM} ${HORDE_INC}/httpd.conf.jonah.beforeJonah
|
|
|
|
@${REINPLACE_CMD} -e "s://UNCOMMENTWHENINSTJONAH::" \
|
|
|
|
${HORDEDIR}/config/registry.php
|
|
|
|
@${CP} -p ${HORDEDIR}/config/registry.php \
|
|
|
|
${HORDEDIR}/config/registry.php.afterJonah
|
|
|
|
@${MKDIR} ${RSS_HTML}/html ${RSS_HTML}/rss
|
|
|
|
@${CHOWN} -R root:www ${RSS_HTML}
|
|
|
|
@if ${GREP} -q -e "conf\['auth'\]\['admins'\] = array()" ${HORDE_CNF} ; then \
|
|
|
|
${ECHO_MSG} "===> Defining admin in ${HORDE_CNF}" ; \
|
|
|
|
${REINPLACE_CMD} -e "s:admins'] = array():admins'] = array('admin'):" ${HORDE_CNF} ; \
|
|
|
|
${CP} -p ${HORDE_CNF} ${HORDE_CNF}.afterJonah ; \
|
|
|
|
fi
|
|
|
|
@if [ ! -f ${PHPSA_INI} ]; then \
|
|
|
|
${ECHO_MSG} "===> Creating ${PHPSA_INI} for PHP standalone" ; \
|
|
|
|
${CP} ${PHPSA_INI}-dist ${PHPSA_INI} ; \
|
|
|
|
fi
|
|
|
|
@if ! ${GREP} -q -e '^include_path' ${PHPSA_INI} ; then \
|
|
|
|
${ECHO_MSG} "===> Configuring ${PHPSA_INI} for PHP standalone" ; \
|
|
|
|
${REINPLACE_CMD} -e 's!;include_path = ".:/php/includes"!include_path = "${LOCALBASE}/include/php:.:${LOCALBASE}/lib/php"!' ${PHPSA_INI} ; \
|
|
|
|
${CP} -p ${PHPSA_INI} ${PHPSA_INI}.afterJonah ; \
|
|
|
|
fi
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
.for FILE in ${DOCS}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${CAT} ${PKGMESSAGE} | \
|
|
|
|
${SED} -e "s:%%JONAHDIR%%:${JONAHDIR}:g;s:%%PORTSDIR%%:${PORTSDIR}:g;s:%%CONFDIR%%:${CONFDIR}:g;s:%%PREFIX%%:${PREFIX}:"
|
|
|
|
@${ECHO_MSG}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|