summaryrefslogtreecommitdiff
path: root/net/nagios-base/Makefile
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2007-11-26 22:14:13 +0000
committerseb <seb@pkgsrc.org>2007-11-26 22:14:13 +0000
commit40ba22b2806ec921e35abfbbf36b561106648abb (patch)
tree71298f4214449b931fb058feefeb073a34d6d671 /net/nagios-base/Makefile
parent54849f656e62f0b41c13c79ae7b9f7346b77aa50 (diff)
downloadpkgsrc-40ba22b2806ec921e35abfbbf36b561106648abb.tar.gz
Bump PKGREVISION to 4.
As proposed on pkgsrc-users@... - Introduce NAGIOSDIR, defaults to VARBASE/spool/nagios, for log and status files. - Drop unused(?) 'nagadmin' user and group. - Sync user and group handling with Nagios install documentation/recommendations. Introduce the Nagios "external command" group, NAGIOSCMD_GROUP, defaults to APACHE_GROUP. The Nagios user should be manually added after package installation to the NAGIOSCMD_GROUP group. Add this recommandation to the MESSAGE file. Make the "external command directory", NAGIOSDIR/rw, owned by NAGIOS_USER:NAGIOSCMD_GROUP. - Use /var/run/nagios.lock as pidfile. - Only install existing example configuration files. - Put default values of NAGIOSDIR, NAGIOS_USER, NAGIOS_GROUP and NAGIOSCMD_GROUP in mk/defaults/mk.conf and allow MAKECONF to override them. - Miscellaneous clean up and sync with the changes mentionned above. - When deleting the package allow removal of directories shared with other Nagios packages to fail.
Diffstat (limited to 'net/nagios-base/Makefile')
-rw-r--r--net/nagios-base/Makefile32
1 files changed, 14 insertions, 18 deletions
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile
index 33cdbedbbbd..67d986c79de 100644
--- a/net/nagios-base/Makefile
+++ b/net/nagios-base/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.15 2007/11/22 09:27:44 abs Exp $
+# $NetBSD: Makefile,v 1.16 2007/11/26 22:14:13 seb Exp $
#
DISTNAME= nagios-2.5
PKGNAME= ${DISTNAME:S/-/-base-/}
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= net sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/}
@@ -22,10 +22,10 @@ CONFIGURE_ARGS+= --with-perlcache
CONFIGURE_ARGS+= --with-nagios-user=${NAGIOS_USER:Q}
CONFIGURE_ARGS+= --with-nagios-group=${NAGIOS_GROUP:Q}
-CONFIGURE_ARGS+= --with-command-user=${ROOT_USER:Q}
-CONFIGURE_ARGS+= --with-command-grp=${ROOT_GROUP:Q}
+CONFIGURE_ARGS+= --with-command-user=${NAGIOS_USER:Q}
+CONFIGURE_ARGS+= --with-command-group=${NAGIOSCMD_GROUP:Q}
CONFIGURE_ARGS+= --with-init-dir=${PREFIX}/share/examples/rc.d
-CONFIGURE_ARGS+= --with-lockfile=/var/run/nagios/nagios.lock
+CONFIGURE_ARGS+= --with-lockfile=/var/run/nagios.lock
USE_TOOLS+= mail:run perl
CONFIGURE_ARGS+= --with-mail=${TOOLS_PLATFORM.mail}
@@ -37,31 +37,27 @@ INSTALL_TARGET= install install-config
BUILD_DEFS+= VARBASE
PKG_GROUPS+= ${NAGIOS_GROUP}
-PKG_GROUPS+= ${NAGIOSADM_GROUP}
+PKG_GROUPS+= ${NAGIOSCMD_GROUP}
PKG_USERS+= ${NAGIOS_USER}:${NAGIOS_GROUP}
-PKG_USERS+= ${NAGIOSADM_USER}:${NAGIOSADM_GROUP}
PKG_GECOS.${NAGIOS_USER}= Nagios Runtime User
-PKG_GECOS.${NAGIOSADM_USER}= Nagios Administrator
-PKG_HOME.${NAGIOSADM_USER}= ${PKG_SYSCONFDIR}
-PKG_SHELL.${NAGIOSADM_USER}= ${SH}
+
+MESSAGE_SUBST+= NAGIOS_USER=${NAGIOS_USER}
+MESSAGE_SUBST+= NAGIOSCMD_GROUP=${NAGIOSCMD_GROUP}
EGDIR= ${PREFIX}/share/examples/nagios
-EGFILES= cgi.cfg checkcommands.cfg contactgroups.cfg contacts.cfg
-EGFILES+= dependencies.cfg escalations.cfg hostgroups.cfg hosts.cfg
-EGFILES+= misccommands.cfg nagios.cfg resource.cfg services.cfg
-EGFILES+= timeperiods.cfg
+EGFILES= cgi.cfg checkcommands.cfg minimal.cfg
+EGFILES+= misccommands.cfg nagios.cfg resource.cfg
.for files in ${EGFILES}
CONF_FILES+= ${EGDIR}/${files}-sample ${PKG_SYSCONFDIR}/${files}
.endfor
CONF_FILES+= ${EGDIR}/nagios.conf ${PKG_SYSCONFDIR}/nagios.conf
-NAGIOS_DIRS= log/nagios log/nagios/archives run/nagios run/nagios/rw
-.for dir in ${NAGIOS_DIRS}
-OWN_DIRS_PERMS+= ${VARBASE}/${dir} ${NAGIOS_USER} ${NAGIOS_GROUP} 0775
-.endfor
+OWN_DIRS_PERMS+=${NAGIOSDIR} ${NAGIOS_USER} ${NAGIOS_GROUP} 0775
+OWN_DIRS_PERMS+=${NAGIOSDIR}/archives ${NAGIOS_USER} ${NAGIOS_GROUP} 0775
+OWN_DIRS_PERMS+=${NAGIOSDIR}/rw ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0775
SUBST_CLASSES+= files
SUBST_STAGE.files= post-build