blob: 0eac1d54f7777bed83cc51f6045781c84ae986ff (
plain)
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
|
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multilib systemd
DESCRIPTION="Nagios Service Check Acceptor"
HOMEPAGE="http://www.nagios.org/"
SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ppc ppc64 sparc x86"
IUSE="tcpd +crypt minimal"
DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 )
!minimal? (
acct-group/nagios
acct-user/nagios
tcpd? ( sys-apps/tcp-wrappers ) )"
RDEPEND="${DEPEND}
!minimal? ( net-analyzer/nagios )"
src_configure() {
use tcpd || export ac_cv_lib_wrap_main=no
use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false
econf \
--localstatedir=/var/nagios \
--sysconfdir=/etc/nagios \
--with-nsca-user=nagios \
--with-nsca-grp=nagios
}
src_compile() {
emake -C src send_nsca $(use minimal || echo nsca)
}
src_install() {
dodoc LEGAL Changelog README SECURITY
dobin src/send_nsca
insinto /etc/nagios
doins "${S}"/sample-config/send_nsca.cfg
if ! use minimal; then
exeinto /usr/libexec
doexe src/nsca
insinto /etc/nagios
doins "${S}"/sample-config/nsca.cfg
systemd_dounit ${FILESDIR}/nsca.service
fi
}
pkg_postinst() {
if ! use minimal; then
elog "If you are using the nsca daemon, remember to edit"
elog "the config file /etc/nagios/nsca.cfg"
fi
}
|