Make this package follow pkgsrc style.
This commit is contained in:
parent
54363d97ea
commit
eaa98bf8d6
6 changed files with 47 additions and 32 deletions
|
@ -1,10 +1,10 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.1 2004/02/29 15:42:26 anewsmurf Exp $
|
||||
$NetBSD: MESSAGE,v 1.2 2004/06/02 16:02:28 cubidou Exp $
|
||||
|
||||
Apache Configuration:
|
||||
You must add this in your httpd.conf file
|
||||
|
||||
ScriptAlias /cgi-bin/nagios/ "/usr/pkg/libexec/nagios/cgi-bin/"
|
||||
ScriptAlias /nagios/cgi-bin/ "/usr/pkg/libexec/nagios/cgi-bin/"
|
||||
|
||||
<Directory "/usr/pkg/libexec/nagios/cgi-bin/">
|
||||
AllowOverride AuthConfig
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.6 2004/05/09 05:04:27 blef Exp $
|
||||
# $NetBSD: Makefile,v 1.7 2004/06/02 16:02:29 cubidou Exp $
|
||||
#
|
||||
|
||||
DISTNAME= nagios-1.2
|
||||
|
@ -11,21 +11,23 @@ MAINTAINER= murray@river-styx.org
|
|||
HOMEPAGE= http://www.nagios.org/
|
||||
COMMENT= Network monitor
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
.include "../../wip/nagios-base/Makefile.common"
|
||||
|
||||
.if defined(WITH_MYSQL)
|
||||
DEPENDS+= mysql-client>=3.23.49:../../databases/mysql-client
|
||||
CONFIGURE_ARGS+=--with-mysql-lib=${LOCALBASE}/lib/mysql \
|
||||
--with-mysql-inc=${LOCALBASE}/include/mysql \
|
||||
--with-mysql-xdata
|
||||
BUILD_DEFS+= NAGIOS_USE_MYSQL NAGIOS_USE_POSTGRESQL
|
||||
|
||||
.if defined(NAGIOS_USE_MYSQL)
|
||||
CONFIGURE_ARGS+= --with-mysql-lib=${LOCALBASE}/lib/mysql \
|
||||
--with-mysql-inc=${LOCALBASE}/include/mysql \
|
||||
--with-mysql-xdata
|
||||
.include "../../databases/mysql-client/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if defined(WITH_POSTGRES)
|
||||
DEPENDS+= pq.3:../../databases/postgresql-client
|
||||
CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/pgsql \
|
||||
--with-pgsql-inc=${LOCALBASE}/pgsql \
|
||||
--with-pgsql-xdata
|
||||
.if defined(NAGIOS_USE_POSTGRESQL)
|
||||
CONFIGURE_ARGS+= --with-pgsql-lib=${LOCALBASE}/pgsql \
|
||||
--with-pgsql-inc=${LOCALBASE}/pgsql \
|
||||
--with-pgsql-xdata
|
||||
.include "../../databases/postgresql-lib/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
CONFIGURE_ARGS+= --with-gd-lib=${LOCALBASE}/lib \
|
||||
|
@ -35,16 +37,34 @@ CONFIGURE_ARGS+= --with-gd-lib=${LOCALBASE}/lib \
|
|||
|
||||
CONFIGURE_ARGS+= --with-nagios-user=${NAGIOS_USER}
|
||||
CONFIGURE_ARGS+= --with-nagios-grp=${NAGIOS_GROUP}
|
||||
CONFIGURE_ARGS+= --with-command-user=root
|
||||
CONFIGURE_ARGS+= --with-command-grp=wheel
|
||||
CONFIGURE_ARGS+= --with-command-user=${ROOT_USER}
|
||||
CONFIGURE_ARGS+= --with-command-grp=${ROOT_GROUP}
|
||||
CONFIGURE_ARGS+= --with-init-dir=${PREFIX}/etc/rc.d
|
||||
CONFIGURE_ARGS+= --with-lockfile=/var/run/nagios/nagios.lock
|
||||
|
||||
INSTALL_TARGET= install install-config
|
||||
|
||||
PKG_GROUPS+= ${NAGIOS_GROUP}
|
||||
PKG_GROUPS+= ${NAGIOSADM_GROUP}
|
||||
|
||||
PKG_USERS+= ${NAGIOS_USER}:${NAGIOS_GROUP}::Nagios\\ Runtime\\ User
|
||||
PKG_USERS+= ${NAGIOSADM_USER}:${NAGIOSADM_GROUP}::Nagios\\ Administrator:${PREFIX}/etc/nagios:${SH}
|
||||
|
||||
EGDIR= ${PREFIX}/share/examples/nagios
|
||||
EGFILES= cgi.cfg checkcommands.cfg contactgroups.cfg contacts.cfg \
|
||||
dependencies.cfg escalations.cfg hostgroups.cfg hosts.cfg \
|
||||
misccommands.cfg nagios.cfg resource.cfg services.cfg \
|
||||
timeperiods.cfg
|
||||
|
||||
.for _f_ in ${EGFILES}
|
||||
CONF_FILES+= ${EGDIR}/${_f_}-sample ${PKG_SYSCONFDIR}/${_f_}
|
||||
.endfor
|
||||
.undef _f_
|
||||
|
||||
post-configure:
|
||||
${SED} < ${FILESDIR}/nagios-setup.sh > ${WRKDIR}/nagios-setup.sh \
|
||||
-e 's:@@USER@@:${NAGIOS_USER}:g' \
|
||||
-e 's:@@SH@@:${SH}:g' \
|
||||
-e 's:@@USER@@:${NAGIOS_USER}:g' \
|
||||
-e 's:@@GROUP@@:${NAGIOS_GROUP}:g'
|
||||
|
||||
post-build:
|
||||
|
@ -59,5 +79,4 @@ post-install:
|
|||
|
||||
.include "../../graphics/gd/buildlink3.mk"
|
||||
.include "../../lang/perl5/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.install.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.common,v 1.4 2004/05/09 05:04:27 blef Exp $
|
||||
# $NetBSD: Makefile.common,v 1.5 2004/06/02 16:02:29 cubidou Exp $
|
||||
#
|
||||
|
||||
NAGIOS_USER?= nagios
|
||||
|
@ -7,23 +7,20 @@ NAGIOS_GROUP?= ${NAGIOS_USER}
|
|||
NAGIOSADM_USER?= nagadmin
|
||||
NAGIOSADM_GROUP?= ${NAGIOSADM_USER}
|
||||
|
||||
PKG_GROUPS+= ${NAGIOS_GROUP}
|
||||
PKG_GROUPS+= ${NAGIOSADM_GROUP}
|
||||
|
||||
PKG_USERS+= ${NAGIOS_USER}:${NAGIOS_GROUP}::Nagios\\ Runtime\\ User
|
||||
PKG_USERS+= ${NAGIOSADM_USER}:${NAGIOSADM_GROUP}::Nagios\\ Administrator:${PREFIX}/etc/nagios:${SH}
|
||||
|
||||
USE_BUILDLINK3= YES
|
||||
|
||||
USE_X11= YES
|
||||
GNU_CONFIGURE= YES
|
||||
USE_GNU_TOOLS+= make
|
||||
USE_PKGINSTALL= YES
|
||||
|
||||
PKG_SYSCONFSUBDIR= nagios
|
||||
|
||||
PERL5_REQD= 5.6
|
||||
|
||||
CONFIGURE_ARGS+= --libexecdir=${PREFIX}/libexec/nagios
|
||||
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/nagios
|
||||
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/nagios
|
||||
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
||||
CONFIGURE_ARGS+= --localstatedir=/var
|
||||
|
||||
CONFIGURE_ARGS+= --with-cgiurl=/nagios/cgi-bin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.2 2004/03/01 08:30:14 cubidou Exp $
|
||||
@comment $NetBSD: PLIST,v 1.3 2004/06/02 16:02:29 cubidou Exp $
|
||||
bin/nagios
|
||||
bin/p1.pl
|
||||
etc/nagios/nagios-setup.sh
|
||||
|
@ -294,7 +294,6 @@ share/nagios/stylesheets/statusmap.css
|
|||
share/nagios/stylesheets/summary.css
|
||||
share/nagios/stylesheets/tac.css
|
||||
share/nagios/stylesheets/trends.css
|
||||
@dirrm share/nagios/ssi
|
||||
@dirrm share/nagios/stylesheets
|
||||
@dirrm share/nagios/media
|
||||
@dirrm share/nagios/images/logos
|
||||
|
@ -302,8 +301,9 @@ share/nagios/stylesheets/trends.css
|
|||
@dirrm share/nagios/docs/images
|
||||
@dirrm share/nagios/docs
|
||||
@dirrm share/nagios/contexthelp
|
||||
@exec ${MKDIR} %D/share/nagios/ssi 2>/dev/null || ${TRUE}
|
||||
@dirrm share/nagios/ssi
|
||||
@dirrm share/nagios
|
||||
@dirrm share/examples/nagios
|
||||
@dirrm libexec/nagios/cgi-bin
|
||||
@dirrm libexec/nagios
|
||||
@dirrm etc/nagios
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# $NetBSD: TODO,v 1.4 2004/02/29 15:41:08 anewsmurf Exp $
|
||||
# $NetBSD: TODO,v 1.5 2004/06/02 16:02:29 cubidou Exp $
|
||||
#
|
||||
|
||||
TODO list for nagios-base
|
||||
- Create a rc.d script. I have one already but I don't like it.
|
||||
- A little more testing.
|
||||
- Add apache installation instructions to some post install
|
||||
message, instead of always looking at doco.
|
||||
- Convert logos in files/ to Nagios instead of Netsaint.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#!@@SH@@
|
||||
#
|
||||
# Run this script as root to create these necessary runtime directories.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue