net-analyzer/ndoutils: Install binaries appropriate to nagios version
authorBertrand Jacquin <bertrand@jacquin.bzh>
Mon, 26 Oct 2015 17:01:37 +0000 (17:01 +0000)
committerBertrand Jacquin <bertrand@jacquin.bzh>
Sat, 31 Oct 2015 12:05:18 +0000 (12:05 +0000)
By default, only Nagios v4.x ndo2db and ndomod.o are install which
break using it on Nagios v3.x

Gentoo Bug #564194

Package-Manager: portage-2.2.20.1

net-analyzer/ndoutils/ndoutils-2.0.0.ebuild

index a7285fe8e9fc2563b7217f2cfcd78b99c387113c..460c9b7a5cdb560d04e50eb943db5d050b05bd05 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -56,6 +56,15 @@ DOCS=(
 
 src_install() {
        default
+
+       local itarget
+       if has_version ">=net-analyzer/nagios-core-4.0" ; then
+               itarget="install-4x"
+       else
+               itarget="install-3x"
+       fi
+
+       emake -C src DESTDIR="${D}" "${itarget}"
        emake DESTDIR="${D}" install-config
 
        newinitd "${FILESDIR}"/ndo2db.init-nagios3 ndo2db