1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils multilib toolchain-funcs
8 MY_P="sap-ccms-plugin-${PV}"
10 DESCRIPTION="Nagios plugin that provides an interface to SAP CCMS
12 HOMEPAGE="https://sourceforge.net/projects/nagios-sap-ccms/"
13 SRC_URI="mirror://sourceforge/nagios-sap-ccms/${MY_P}.tar.bz2"
20 QA_PRESTRIPPED="/usr/lib/librfccm.so"
21 QA_FLAGS_IGNORED="/usr/lib/librfccm.so"
24 net-analyzer/nagios-core
29 S="${WORKDIR}/${PN/-plugin*}"
32 epatch "${FILESDIR}"/${P}-gentoo.patch
33 sed -i src/sap_moni/* \
34 -e 's|#include "iniparser.h"|#include <iniparser.h>|g' \
35 || die "sed sap_moni/"
39 emake -C src CC=$(tc-getCC)
44 exeinto /usr/$(get_libdir)/nagios/plugins
46 for file in {check_sap{,_cons,_instance,_instance_cons,_mult_no_thr,_multiple,_system,_system_cons},create_cfg,sap_change_thr}
51 chown -R root:nagios "${D}"/usr/$(get_libdir)/nagios/plugins || die "Failed Chown of ${D}usr/$(get_libdir)/nagios/plugins"
54 newlib.so $(readlink librfccm.so) librfccm.so
63 elog "Have a look at /etc/sapmon for configuring ${PN}"
64 elog "Further information can be found at"
65 elog "http://nagios-sap-ccms.sourceforge.net/"