| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-nsca/nagios-nsca-2.7.2-r101.ebuild,v 1.1 2012/08/18 00:17:19 flameeyes Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit multilib
|
| 8 |
|
| 9 |
DESCRIPTION="Nagios NSCA - Nagios Service Check Acceptor"
|
| 10 |
HOMEPAGE="http://www.nagios.org/"
|
| 11 |
SRC_URI="mirror://sourceforge/nagios/nsca-${PV}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="GPL-2"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
| 16 |
IUSE="tcpd"
|
| 17 |
|
| 18 |
DEPEND=">=dev-libs/libmcrypt-2.5.1-r4
|
| 19 |
tcpd? ( sys-apps/tcp-wrappers )"
|
| 20 |
|
| 21 |
RDEPEND="${DEPEND}
|
| 22 |
sys-apps/openrc"
|
| 23 |
|
| 24 |
S="${WORKDIR}/nsca-${PV}"
|
| 25 |
|
| 26 |
pkg_setup() {
|
| 27 |
enewgroup nagios
|
| 28 |
enewuser nagios -1 /bin/bash /var/nagios/home nagios
|
| 29 |
}
|
| 30 |
|
| 31 |
src_configure() {
|
| 32 |
use tcpd || export ac_cv_lib_wrap_main=no
|
| 33 |
|
| 34 |
econf
|
| 35 |
--localstatedir=/var/nagios \
|
| 36 |
--sysconfdir=/etc/nagios \
|
| 37 |
--with-nsca-user=nagios \
|
| 38 |
--with-nsca-grp=nagios
|
| 39 |
}
|
| 40 |
|
| 41 |
src_install() {
|
| 42 |
dodoc LEGAL Changelog README SECURITY
|
| 43 |
|
| 44 |
insinto /etc/nagios
|
| 45 |
doins "${S}"/sample-config/nsca.cfg
|
| 46 |
doins "${S}"/sample-config/send_nsca.cfg
|
| 47 |
|
| 48 |
dobin src/send_nsca
|
| 49 |
|
| 50 |
exeinto /usr/libexec
|
| 51 |
doexe src/nsca
|
| 52 |
|
| 53 |
newinitd "${FILESDIR}"/nsca.init nsca
|
| 54 |
}
|
| 55 |
|
| 56 |
pkg_postinst() {
|
| 57 |
elog "If you are using the nsca daemon, remember to edit"
|
| 58 |
elog "the config file /etc/nagios/nsca.cfg"
|
| 59 |
}
|