2003-03-02 01:24:16 +01:00
|
|
|
# Ports collection makefile for: ganglia-monitor-core
|
|
|
|
# Date created: Wed Jan 23, 2003
|
|
|
|
# Whom: Brooks Davis <brooks@freebsd.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2005-03-04 22:14:06 +01:00
|
|
|
PORTNAME= monitor-core
|
2005-04-15 23:19:46 +02:00
|
|
|
PORTVERSION= 3.0.1
|
|
|
|
PORTREVISION= 0
|
2003-03-02 01:24:16 +01:00
|
|
|
CATEGORIES= sysutils net parallel
|
2005-04-15 23:19:46 +02:00
|
|
|
.if !defined(PORTDEV)
|
2003-03-02 01:24:16 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
2005-04-15 23:19:46 +02:00
|
|
|
.else
|
|
|
|
MASTER_SITES= http://matt-massie.com/%SUBDIR%/
|
|
|
|
.endif
|
2003-03-02 01:24:16 +01:00
|
|
|
MASTER_SITE_SUBDIR= ganglia
|
2005-03-04 22:14:06 +01:00
|
|
|
PKGNAMEPREFIX= ganglia-
|
2005-04-15 23:19:46 +02:00
|
|
|
.if defined(CLUSTER)
|
|
|
|
PKGNAMESUFFIX= -${CLUSTER}
|
|
|
|
.endif
|
2005-03-02 00:04:37 +01:00
|
|
|
DISTNAME= ganglia-${PORTVERSION}
|
2003-03-02 01:24:16 +01:00
|
|
|
|
|
|
|
MAINTAINER= brooks@FreeBSD.org
|
2003-11-09 00:02:06 +01:00
|
|
|
COMMENT= Ganglia cluster monitor, monitoring daemon
|
2003-03-02 01:24:16 +01:00
|
|
|
|
2005-03-04 22:14:06 +01:00
|
|
|
PKGINSTALL= ${WRKSRC}/pkg-install
|
|
|
|
|
2005-04-15 23:19:46 +02:00
|
|
|
OPTIONS+= GMETAD "include gmetad" on \
|
|
|
|
LIBGANGLIA "include libganglia" off
|
2005-03-02 00:04:37 +01:00
|
|
|
|
2003-03-02 01:24:16 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2005-03-04 22:14:06 +01:00
|
|
|
CONFIGURE_ENV= CFLAGS="${_CFLAGS}" LDFLAGS="${_LDFLAGS}"
|
|
|
|
_CFLAGS= ${CFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
|
|
|
|
_LDFLAGS= ${LDFLAGS} -L${LOCALBASE}/lib
|
2003-11-08 17:15:15 +01:00
|
|
|
|
2005-03-02 00:04:37 +01:00
|
|
|
USE_REINPLACE= yes
|
|
|
|
USE_BZIP2= yes
|
|
|
|
USE_RC_SUBR= ganglia.sh
|
|
|
|
|
|
|
|
SUB_FILES= pkg-install
|
|
|
|
|
2005-04-15 23:19:46 +02:00
|
|
|
.if defined (GMETAD_CONF)
|
|
|
|
.if !exists (${GMETAD_CONF})
|
|
|
|
IGNORE= "GMETAD_CONF must point to an existing file when defined"
|
|
|
|
.endif
|
|
|
|
.else
|
|
|
|
GMETAD_CONF= ${WRKSRC}/gmetad/gmetad.conf
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined (GMOND_CONF)
|
|
|
|
.if !exists (${GMOND_CONF})
|
|
|
|
IGNORE= "GMOND_CONF must point to an existing file when defined"
|
|
|
|
.endif
|
|
|
|
.else
|
|
|
|
GMOND_CONF= ${WRKDIR}/gmond.conf
|
|
|
|
.endif
|
|
|
|
|
2005-03-02 00:04:37 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined (WITH_GMETAD)
|
2005-03-14 22:03:41 +01:00
|
|
|
LIB_DEPENDS= rrd.0:${PORTSDIR}/net/rrdtool
|
2003-03-02 01:24:16 +01:00
|
|
|
CONFIGURE_ARGS+= --with-gmetad
|
2005-04-15 23:19:46 +02:00
|
|
|
PLIST_SUB+= GMETAD=
|
|
|
|
SUB_LIST+= GMETAD=
|
|
|
|
.else
|
2003-03-02 01:24:16 +01:00
|
|
|
PLIST_SUB+= GMETAD="@comment "
|
2005-03-02 00:04:37 +01:00
|
|
|
SUB_LIST+= GMETAD="\#"
|
2005-04-15 23:19:46 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined (WITH_LIBGANGLIA)
|
|
|
|
INSTALLS_SHLIB= yes
|
|
|
|
PLIST_SUB+= LIBGANGLIA=
|
2003-03-02 01:24:16 +01:00
|
|
|
.else
|
2005-04-15 23:19:46 +02:00
|
|
|
PLIST_SUB+= LIBGANGLIA="@comment "
|
2003-03-02 01:24:16 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
MAN1= gmetric.1 gmond.1 gstat.1
|
2005-03-02 00:04:37 +01:00
|
|
|
.if defined (WITH_GMETAD)
|
2003-03-02 01:24:16 +01:00
|
|
|
MAN1+= gmetad.1
|
|
|
|
.endif
|
2005-03-02 00:04:37 +01:00
|
|
|
MAN5= gmond.conf.5
|
2003-03-02 01:24:16 +01:00
|
|
|
|
|
|
|
CONF_DIR= ${PREFIX}/etc
|
2005-03-02 00:04:37 +01:00
|
|
|
|
|
|
|
FIX_CONF_FILES= ganglia.pod \
|
|
|
|
mans/gmetad.1 \
|
|
|
|
mans/gmond.1 \
|
|
|
|
gmetad/cmdline.c \
|
|
|
|
gmetad/cmdline.h \
|
|
|
|
gmond/g25_config.h \
|
|
|
|
gmetric/cmdline.c \
|
|
|
|
gmetric/cmdline.h \
|
|
|
|
gmond/cmdline.c \
|
|
|
|
gmond/cmdline.h
|
|
|
|
FIX_DB_FILES= ganglia.pod \
|
|
|
|
gmetad/conf.c \
|
|
|
|
gmetad/gmetad.conf
|
2003-03-02 01:24:16 +01:00
|
|
|
|
|
|
|
post-patch:
|
2005-03-02 00:04:37 +01:00
|
|
|
${REINPLACE_CMD} -e "s|/etc/\(gm[a-z]*d.conf\)|${PREFIX}/etc/\1|g" \
|
|
|
|
${FIX_CONF_FILES:S|^|${WRKSRC}/|}
|
2003-03-02 01:24:16 +01:00
|
|
|
${REINPLACE_CMD} -e "s|/var/lib/ganglia|/var/db/ganglia|g" \
|
2005-03-02 00:04:37 +01:00
|
|
|
${FIX_DB_FILES:S|^|${WRKSRC}/|}
|
2003-03-02 01:24:16 +01:00
|
|
|
|
2005-03-02 00:04:37 +01:00
|
|
|
post-build:
|
|
|
|
${WRKSRC}/gmond/gmond -t > ${WRKDIR}/gmond.conf
|
2003-03-02 01:24:16 +01:00
|
|
|
|
2005-04-15 23:19:46 +02:00
|
|
|
do-install:
|
|
|
|
.if defined (WITH_GMETAD)
|
|
|
|
cd ${WRKSRC}/gmetad && make install
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 ${MANPREFIX}/man/man1
|
|
|
|
${INSTALL_DATA} ${GMETAD_CONF} ${PREFIX}/etc/gmetad.conf.sample
|
|
|
|
.endif
|
|
|
|
cd ${WRKSRC}/gmetric && make install
|
2003-03-02 01:24:16 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/mans/gmetric.1 ${MANPREFIX}/man/man1
|
2005-04-15 23:19:46 +02:00
|
|
|
cd ${WRKSRC}/gmond && make install
|
2003-03-02 01:24:16 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/mans/gmond.1 ${MANPREFIX}/man/man1
|
2005-03-02 00:04:37 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/gmond/gmond.conf.5 ${MANPREFIX}/man/man5
|
2003-03-02 01:24:16 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/mans/gstat.1 ${MANPREFIX}/man/man1
|
2005-04-15 23:19:46 +02:00
|
|
|
${INSTALL_DATA} ${GMOND_CONF} ${PREFIX}/etc/gmond.conf.sample
|
|
|
|
.if defined (WITH_LIBGANGLIA)
|
|
|
|
cd ${WRKSRC}/lib && make install
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/ganglia-config ${PREFIX}/bin
|
2003-03-02 01:24:16 +01:00
|
|
|
.endif
|
2005-04-15 23:19:46 +02:00
|
|
|
|
|
|
|
post-install:
|
2005-03-02 00:04:37 +01:00
|
|
|
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2003-03-02 01:24:16 +01:00
|
|
|
|
2005-03-02 00:04:37 +01:00
|
|
|
.include <bsd.port.post.mk>
|