summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-10-24 19:18:40 +0200
committerDavid Seifert <soap@gentoo.org>2020-10-24 19:18:40 +0200
commitdda04ca9110dd9abbd8262c37c5d2b026f4f69e8 (patch)
treea1787eea24ac9eb9bdfeaca536e0f650d4c7dbb7 /net-analyzer/nsca
parentnet-analyzer/nagios-plugins-snmp: Port to EAPI 7 (diff)
downloadgentoo-dda04ca9110dd9abbd8262c37c5d2b026f4f69e8.tar.gz
gentoo-dda04ca9110dd9abbd8262c37c5d2b026f4f69e8.tar.bz2
gentoo-dda04ca9110dd9abbd8262c37c5d2b026f4f69e8.zip
net-analyzer/nsca: Port to EAPI 7
Closes: https://bugs.gentoo.org/742218 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-analyzer/nsca')
-rw-r--r--net-analyzer/nsca/nsca-2.7.2-r103.ebuild41
1 files changed, 20 insertions, 21 deletions
diff --git a/net-analyzer/nsca/nsca-2.7.2-r103.ebuild b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild
index 9fe0ae002f79..c7120d06b665 100644
--- a/net-analyzer/nsca/nsca-2.7.2-r103.ebuild
+++ b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild
@@ -1,9 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
-
-inherit multilib user eutils
+EAPI=7
DESCRIPTION="Nagios Service Check Acceptor"
HOMEPAGE="https://www.nagios.org/"
@@ -15,28 +13,29 @@ KEYWORDS="~alpha amd64 ~arm ppc ppc64 sparc x86"
IUSE="tcpd +crypt minimal"
DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 )
- !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )"
-
+ !minimal? (
+ tcpd? ( sys-apps/tcp-wrappers )
+ acct-group/icinga
+ acct-group/nagios
+ acct-user/icinga
+ acct-user/nagios
+ )"
RDEPEND="${DEPEND}
- !minimal? ( || ( net-analyzer/icinga net-analyzer/nagios ) )
+ !minimal? (
+ || (
+ net-analyzer/icinga
+ net-analyzer/nagios
+ )
+ )
sys-apps/openrc"
-pkg_setup() {
- if ! use minimal; then
- enewgroup nagios
- enewgroup icinga
- enewuser nagios -1 /bin/bash /var/nagios/home nagios
- enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
- fi
-}
-
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 \
+ --localstatedir="${EPREFIX}"/var/nagios \
+ --sysconfdir="${EPREFIX}"/etc/nagios \
--with-nsca-user=nagios \
--with-nsca-grp=nagios
}
@@ -49,7 +48,7 @@ src_compile() {
-e '/nsca_\(user\|group\)/s:nagios:icinga:' \
-e '/nsca_chroot/s:=.*:=/var/lib/icinga/rw:' \
-e '/\(command\|alternate_dump\)_file/s:/var/nagios:/var/lib/icinga:' \
- "${S}"/sample-config/nsca.cfg > "${T}"/nsca.icinga.cfg
+ "${S}"/sample-config/nsca.cfg > "${T}"/nsca.icinga.cfg || die
}
src_install() {
@@ -58,7 +57,7 @@ src_install() {
dobin src/send_nsca
insinto /etc/nagios
- doins "${S}"/sample-config/send_nsca.cfg
+ doins sample-config/send_nsca.cfg
if ! use minimal; then
exeinto /usr/libexec
@@ -68,7 +67,7 @@ src_install() {
newconfd "${FILESDIR}"/nsca.conf nsca
insinto /etc/nagios
- doins "${S}"/sample-config/nsca.cfg
+ doins sample-config/nsca.cfg
insinto /etc/icinga
newins "${T}"/nsca.icinga.cfg nsca.cfg
@@ -79,7 +78,7 @@ 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"
- elog ""
+ elog
elog "If you intend to use nsca with Icinga, change the"
elog "configuration file path in /etc/conf.d/nsca so that"
elog "it will default to the correct paths and users."