a1f5cdc4bd
It's a beta, handle with care.
124 lines
3.3 KiB
Makefile
124 lines
3.3 KiB
Makefile
# $NetBSD: Makefile,v 1.1.1.1 2010/02/14 16:11:11 spz Exp $
|
|
#
|
|
|
|
DISTNAME= xymon-4.3.0-beta2
|
|
PKGNAME= xymonclient-4.3.0b2
|
|
CATEGORIES= net
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hobbitmon/}
|
|
|
|
MAINTAINER= spz@NetBSD.org
|
|
HOMEPAGE= http://hobbitmon.sourceforge.net/
|
|
COMMENT= Network services monitor a la Big Brother
|
|
LICENSE= gnu-gpl-v2
|
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
CONFLICTS+= hobbitmon-[0-9]*
|
|
CONFLICTS+= hobbitclient-[0-9]*
|
|
|
|
HAS_CONFIGURE= YES
|
|
USE_TOOLS+= gmake
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
# xymons user/group
|
|
|
|
BBUSER?= xymon
|
|
BBGROUP?= xymon
|
|
|
|
PKG_GROUPS= ${BBGROUP}
|
|
PKG_USERS= ${BBUSER:Q}:${BBGROUP:Q}
|
|
|
|
PKG_GECOS.${BBUSER}= Xymon monitor
|
|
PKG_HOME.${BBUSER}= ${BBHOME}
|
|
|
|
PKG_GROUPS_VARS+= BBGROUP
|
|
PKG_USERS_VARS+= BBUSER
|
|
|
|
# startup and config
|
|
|
|
RCD_SCRIPTS+= xymonclient
|
|
PKG_SYSCONFDIR.xymon= ${PREFIX}/etc/xymon
|
|
EXAMPLEDIR= ${PREFIX}/share/examples/xymon
|
|
|
|
BBHOME?= ${PREFIX}/share/xymon/bbhome
|
|
BBTOPDIR?= ${PREFIX}/libexec/xymon
|
|
|
|
BBSERVERNAME?= "`uname -n`"
|
|
BBSERVERIP?= 127.0.0.1
|
|
|
|
BBLOGDIR?= ${VARBASE}/log/xymon
|
|
BBVAR?= ${VARBASE}/xymon
|
|
|
|
XYBINDIR?= ${BBTOPDIR}
|
|
XYETCDIR?= ${PKG_SYSCONFDIR.xymon}
|
|
XYEXTDIR?= ${BBTOPDIR}/ext
|
|
XYTMPDIR?= ${VARBASE}/xymon/tmp
|
|
|
|
BUILD_DEFS+= VARBASE
|
|
BUILD_DEFS+= BBSERVERNAME
|
|
BUILD_DEFS+= BBSERVERIP
|
|
|
|
FILES_SUBST+= BBHOME=${BBHOME:Q}
|
|
FILES_SUBST+= BBLOGDIR=${BBLOGDIR:Q}
|
|
FILES_SUBST+= BBVAR=${BBVAR:Q}
|
|
FILES_SUBST+= XYBINDIR=${XYBINDIR:Q}
|
|
FILES_SUBST+= XYETCDIR=${XYETCDIR:Q}
|
|
FILES_SUBST+= XYEXTDIR=${XYEXTDIR:Q}
|
|
FILES_SUBST+= XYTMPDIR=${XYTMPDIR:Q}
|
|
|
|
CONFIGURE_ARGS+= "--client"
|
|
|
|
CONFIGURE_ENV+= CONFTYPE="server"
|
|
CONFIGURE_ENV+= PKGBUILD=y
|
|
CONFIGURE_ENV+= BBHOSTNAME=${BBSERVERNAME:Q}
|
|
CONFIGURE_ENV+= BBHOSTIP=${BBSERVERIP:Q}
|
|
CONFIGURE_ENV+= BBUSER=${BBUSER:Q}
|
|
CONFIGURE_ENV+= BBHOME=${BBHOME:Q}
|
|
CONFIGURE_ENV+= BBTOPDIR=${BBTOPDIR:Q}
|
|
CONFIGURE_ENV+= BBLOGDIR=${BBLOGDIR:Q}
|
|
CONFIGURE_ENV+= BBVAR=${BBVAR:Q}
|
|
CONFIGURE_ENV+= INSTALLROOT=${DESTDIR}
|
|
CONFIGURE_ENV+= INSTALLBINDIR=${XYBINDIR:Q}
|
|
CONFIGURE_ENV+= INSTALLETCDIR=${XYETCDIR:Q}
|
|
CONFIGURE_ENV+= INSTALLEXADIR=${EXAMPLEDIR:Q}
|
|
CONFIGURE_ENV+= INSTALLEXTDIR=${XYEXTDIR:Q}
|
|
CONFIGURE_ENV+= INSTALLTMPDIR=${XYTMPDIR:Q}
|
|
CONFIGURE_ENV+= MANROOT=${PREFIX}/${PKGMANDIR}/
|
|
|
|
USE_TOOLS+= awk:run cat:run cp:run
|
|
USE_TOOLS+= cut:run date:run egrep:run
|
|
USE_TOOLS+= expr:run find:run grep:run
|
|
USE_TOOLS+= head:run id:run ls:run
|
|
USE_TOOLS+= mv:run rm:run sed:run
|
|
USE_TOOLS+= sort:run tail:run touch:run
|
|
USE_TOOLS+= tr:run wc:run
|
|
|
|
|
|
OWN_DIRS+= ${BBTOPDIR}
|
|
MAKE_DIRS+= ${BBTOPDIR}/client
|
|
OWN_DIRS+= ${EXAMPLEDIR}
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR.xymon}
|
|
OWN_DIRS+= ${BBHOME}
|
|
MAKE_DIRS+= ${BBHOME}/client
|
|
|
|
OWN_DIRS_PERMS+= ${XYEXTDIR}/client ${BBUSER} ${BBGROUP} 0755
|
|
OWN_DIRS_PERMS+= ${BBLOGDIR} ${BBUSER} ${BBGROUP} 0755
|
|
OWN_DIRS_PERMS+= ${XYTMPDIR} ${BBUSER} ${BBGROUP} 0755
|
|
OWN_DIRS_PERMS+= ${XYTMPDIR}/client ${BBUSER} ${BBGROUP} 0755
|
|
|
|
OWN_DIRS_PERMS+= ${BBVAR} ${BBUSER} ${BBGROUP} 0755
|
|
OWN_DIRS_PERMS+= ${BBVAR}/data ${BBUSER} ${BBGROUP} 0755
|
|
|
|
CFILES+= clientlaunch.cfg hobbitclient.cfg localclient.cfg
|
|
.for file in ${CFILES}
|
|
CONF_FILES_PERMS+= ${EXAMPLEDIR}/${file} ${PKG_SYSCONFDIR.xymon}/${file} ${BBUSER} ${BBGROUP} 0644
|
|
.endfor
|
|
|
|
MAKE_ENV+= MAKE=${MAKE_PROGRAM:Q}
|
|
MAKE_ENV+= PKGDIR=${PREFIX:Q}
|
|
MAKE_ENV+= INSTALLROOT=${DESTDIR}
|
|
MAKE_ENV+= PKGBUILD=y
|
|
MAKE_ENV+= ${TOOLS_ENV}
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|