aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nagios4/Makefile
blob: bb19a877b2180b831fc69cff914a4c5bf45decd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Created by: Blaz Zupan <blaz@si.FreeBSD.org>
# $FreeBSD$

PORTNAME=   nagios
PORTVERSION=    4.0.7
CATEGORIES= net-mgmt
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}-4.x/${PORTNAME}-${PORTVERSION}
PKGNAMESUFFIX=  4

MAINTAINER= mat@FreeBSD.org
COMMENT=    Powerful network monitoring system

LICENSE=    GPLv2

LIB_DEPENDS=    libgd.so:${PORTSDIR}/graphics/gd

USES=       gmake iconv perl5 uidfix
USE_PERL5=  build
USE_AUTOTOOLS=  autoconf libltdl
USE_PHP=    xml
USE_RC_SUBR=    nagios

CONFLICTS=  nagios-[123].* nagios-devel-*

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \
        --with-command-group=${WWWGRP} \
        --with-nagios-user=${NAGIOSUSER} \
        --with-nagios-group=${NAGIOSGROUP} \
        --with-htmurl=${NAGIOSHTMURL} \
        --with-cgiurl=${NAGIOSCGIURL} \
        --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \
        --libexecdir=${PREFIX}/libexec/nagios \
        --datarootdir=${PREFIX}/${NAGIOSWWWDIR} \
        --datadir=${PREFIX}/${NAGIOSWWWDIR} \
        --sysconfdir=${PREFIX}/etc/nagios \
        --localstatedir=${NAGIOSDIR} \
        --with-httpd-conf=${PREFIX}/etc \
        --with-checkresult-dir=${NAGIOSDIR}/checkresults \
        --disable-statuswrl \
        --enable-event-broker
CONFIGURE_ENV=  LIBS="-L${LOCALBASE}/lib" \
        PERL=${PERL}

CPPFLAGS+=  -I${LOCALBASE}/include -fPIC
CFLAGS+=    ${CPPFLAGS}

INSTALL_TARGET= install install-commandmode install-config
PLIST_SUB=  NAGIOSDIR=${NAGIOSDIR} \
        NAGIOSWWWDIR=${NAGIOSWWWDIR} \
        NAGIOSUSER=${NAGIOSUSER} \
        NAGIOSGROUP=${NAGIOSGROUP} \
        WWWGRP=${WWWGRP}
SUB_LIST=   NAGIOSDIR=${NAGIOSDIR} \
        NAGIOSWWWDIR=${PREFIX}/${NAGIOSWWWDIR} \
        NAGIOSUSER=${NAGIOSUSER} \
        NAGIOSGROUP=${NAGIOSGROUP} \
        NAGIOSHTMURL=${NAGIOSHTMURL} \
        NAGIOSCGIURL=${NAGIOSCGIURL}

SUB_FILES=  pkg-message

NAGIOSUSER?=    nagios
NAGIOSGROUP?=   nagios
NAGIOSDIR?= /var/spool/nagios

NAGIOSWWWDIR?=  www/nagios
NAGIOSHTMURL?=  /nagios
NAGIOSCGIURL?=  ${NAGIOSHTMURL}/cgi-bin

USERS=      ${NAGIOSUSER}
GROUPS=     ${NAGIOSGROUP}

OPTIONS_DEFINE= NANOSLEEP UNHANDLED_HACK
NANOSLEEP_DESC=     Use nanosleep in event timing
UNHANDLED_HACK_DESC=    Display passive checks in unhandled queries

OPTIONS_SUB=

NANOSLEEP_CONFIGURE_ENABLE= nanosleep

# sed -e 's#;serviceprops=42\&#;serviceprops=10\&#g' -e \
#    's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php
UNHANDLED_HACK_EXTRA_PATCHES=   ${PATCHDIR}/extra-patch-html__side.php

post-install:
    @${MV} ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php.sample

.include <bsd.port.mk>