freebsd-ports/sysutils/ganglia-webfrontend/Makefile
Mark Linimon b367f5c3e7 Update to 2.5.5 (no major changes from 2.5.4).
Major changes to the port infrastructure:
 - Replace WWWDOCROOT and WEBFRONTURL options with WEBFRONTDIR
   (defaults to www/ganglia).
 - Install files under ${PREFIX}/${WEBFRONTDIR}.
 - Since the files are no longer installed in the document root,
   add a pkg-message with a suggest addition to Apache's
   httpd.conf.
 - Use USE_PHP and WANT_PHP_MOD.
 - Add a note about installing PHP with GD support at done in
   mail/nocc.
 - Remove conf.php only if it is identical to conf.php.sample as
   done in mail/nocc.
 - Sizify.
 - Don't install the empty addons directory since packages won't
   contain it.

PR:		ports/62802
Submitted by:	Brooks Davis <brooks@FreeBSD.org> (maintainer)
2004-02-18 06:34:16 +00:00

86 lines
2.6 KiB
Makefile

# Ports collection makefile for: ganglia-webfrontend
# Date created: Thu Fed 20, 2003
# Whom: Brooks Davis <brooks@freebsd.org>
#
# $FreeBSD$
#
PORTNAME= ganglia-webfrontend
PORTVERSION= 2.5.5
CATEGORIES= sysutils net parallel www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ganglia
MAINTAINER= brooks@FreeBSD.org
COMMENT= "Ganglia cluster monitor, web frontend"
RUN_DEPENDS+= ${LOCALBASE}/sbin/gmetad:${PORTSDIR}/sysutils/ganglia-monitor-core
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST_SUB+= WEBFRONTDIR="${WEBFRONTDIR}"
NO_BUILD= yes
USE_REINPLACE= yes
USE_PHP= yes
WANT_PHP_MOD= yes
# The Ganglia Web Frontend port supports a number of options that may be
# tweaked at buildtime. Perform a "make options" to see more
# information on these variables.
WEBFRONTDIR?= www/ganglia
WWWOWN?= www
WWWGRP?= www
# Set custom variables:
#
PKGOPTS= ${FILESDIR}/pkg-opts
EXCEPTFILES= AUTHORS ChangeLog COPYING addons webfrontend.spec
pre-everything::
@${ECHO} ""
@${ECHO} "You have to configure PHP with GD support to allow "
@${ECHO} "the Ganglia Webfrontend draw some standard graphs.
@${ECHO} ""
@${ECHO} "If you have already compiled PHP without GD,"
@${ECHO} "press CTRL+C now and rebuild it before installing"
@${ECHO} "the Ganglia Webfrontend."
@${ECHO} ""
pre-patch:
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%WEBFRONTDIR%%|${WEBFRONTDIR}|g' \
${.CURDIR}/pkg-message > ${PKGMESSAGE}
options:
@ ${ECHO_MSG} "===> Build options for ${PKGNAME}:"
@ ${CAT} ${PKGOPTS}
post-extract:
.if !defined(BATCH)
@ ${TEST} -r ${PKGOPTS} && \
(${ECHO_MSG} '-------------------------------------------------------------------------'; \
${ECHO_MSG} 'Perform a "make options" to see a list of available installation options.'; \
${ECHO_MSG} '-------------------------------------------------------------------------')
.endif
post-patch:
@ ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/conf.php
do-install:
${MKDIR} ${PREFIX}/${WEBFRONTDIR}
${MKDIR} -m 0775 ${PREFIX}/${WEBFRONTDIR}
cd ${WRKSRC} && ${FIND} * \( -name conf.php\* \
${EXCEPTFILES:S/^/-o -name /} \) \
-a -prune -o -print \
| ${TAR} cTf - - | ${TAR} xUCf ${PREFIX}/${WEBFRONTDIR} -
${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${WEBFRONTDIR}
${INSTALL} -c -o ${WWWOWN} -g ${WWWGRP} \
${WRKSRC}/conf.php ${PREFIX}/${WEBFRONTDIR}/conf.php.sample
@if [ ! -f ${PREFIX}/${WEBFRONTDIR}/conf.php ]; then \
${INSTALL} -c -o ${WWWOWN} -g ${WWWGRP} \
${WRKSRC}/conf.php ${PREFIX}/${WEBFRONTDIR} ;\
fi
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>