commit:     ddf3132d1f534e5a98484aceb4393f9f3478a1cc
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 23:06:54 2017 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 21:34:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddf3132d

net-analyzer/check_mk_agent: split agent from otherwise hard-to-update check_mk

Package-Manager: portage-2.3.0

 net-analyzer/check_mk_agent/Manifest               |  1 +
 .../check_mk_agent/check_mk_agent-1.2.8_p16.ebuild | 95 ++++++++++++++++++++++
 net-analyzer/check_mk_agent/metadata.xml           | 25 ++++++
 3 files changed, 121 insertions(+)

diff --git a/net-analyzer/check_mk_agent/Manifest 
b/net-analyzer/check_mk_agent/Manifest
new file mode 100644
index 00000000..ce6cf56
--- /dev/null
+++ b/net-analyzer/check_mk_agent/Manifest
@@ -0,0 +1 @@
+DIST check_mk-1.2.8p16.tar.gz 16298683 SHA256 
b161d4e37b4313696c93b9272626bcc367c90f4be1798bd283c3b581795e1747 SHA512 
601c76b2b62de9176122c69b011b5f7ac6b71650d1b3e411c103f5e9c3e91256ce8d3db6fcd1edc2a11f86dcba4e8ea18ec5a1f9f3eae5b25a4bb3ba712341eb
 WHIRLPOOL 
7ef193c4e9087866ae635e198b2028abb1c245914dcf81240b6939c76a83ab5a4389de7d0e363239bbf12467cd276790d9c85553354ad10a7da1612054438fea

diff --git a/net-analyzer/check_mk_agent/check_mk_agent-1.2.8_p16.ebuild 
b/net-analyzer/check_mk_agent/check_mk_agent-1.2.8_p16.ebuild
new file mode 100644
index 00000000..d0c26c8
--- /dev/null
+++ b/net-analyzer/check_mk_agent/check_mk_agent-1.2.8_p16.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit systemd
+
+DESCRIPTION="Agent to report data to Check_MK for monitoring"
+HOMEPAGE="http://mathias-kettner.de/check_mk.html";
+
+MY_PV="${PV/_p/p}"
+MY_P="check_mk-${MY_PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="apache_status logwatch mysql nfsexports oracle postgres smart +xinetd 
zypper"
+
+RDEPEND="!!net-analyzer/check_mk
+       app-shells/bash:*
+       xinetd? ( || ( sys-apps/xinetd sys-apps/systemd ) )
+       "
+DEPEND="${RDEPEND}"
+
+SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz";
+
+src_unpack() {
+       # check_mk is a tarball containing tarballs
+       unpack ${A}
+       mkdir -p "${S}" || die
+       cd "${S}" || die
+       unpack "${WORKDIR}"/${MY_P}/agents.tar.gz
+       mkdir -p "${S}"/doc || die
+       cd "${S}"/doc || die
+       unpack "${WORKDIR}"/${MY_P}/doc.tar.gz
+}
+
+src_prepare() {
+       cat <<EOF >Makefile
+all: waitmax
+
+waitmax: waitmax.c
+       \$(CC) \$(CFLAGS) \$< -o \$@ \$(LDFLAGS)
+
+EOF
+
+       if [[ -f waitmax ]]; then
+               rm waitmax || die "Couldn't delete precompiled waitmax file"
+       fi
+
+       default
+}
+
+src_compile() {
+       # compile waitmax
+       emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+       # Install agent related files
+       newbin check_mk_agent.linux check_mk_agent
+       dobin waitmax
+
+       keepdir /usr/lib/check_mk_agent/local
+       dodir /usr/lib/check_mk_agent/plugins
+       dodir /etc/check_mk
+
+       dodoc doc/{AUTHORS,COPYING,ChangeLog}
+       docompress
+
+       if use xinetd; then
+               insinto /etc/xinetd.d
+               newins cfg_examples/xinetd.conf check_mk
+               systemd_dounit cfg_examples/systemd/check_mk{.socket,@.service}
+       fi
+
+       # Install the check_mk_agent logwatch plugin
+       if use logwatch; then
+               insinto /etc/check_mk
+               doins cfg_examples/logwatch.cfg
+               exeinto /usr/lib/check_mk_agent/plugins
+               doexe plugins/mk_logwatch
+       fi
+
+       # Install any other useflag-enabled agent plugins
+       exeinto /usr/lib/check_mk_agent/plugins
+       use smart && doexe plugins/smart
+       use mysql && doexe plugins/mk_mysql
+       use postgres && doexe plugins/mk_postgres
+       use apache_status && doexe plugins/apache_status
+       use zypper && doexe plugins/mk_zypper
+       use oracle && doexe plugins/mk_oracle
+       use nfsexports && doexe plugins/nfsexports
+}

diff --git a/net-analyzer/check_mk_agent/metadata.xml 
b/net-analyzer/check_mk_agent/metadata.xml
new file mode 100644
index 00000000..8cdfbbe
--- /dev/null
+++ b/net-analyzer/check_mk_agent/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Ian Stakenvicius (_AxS_)</name>
+       </maintainer>
+       <longdescription lang="en">
+               The agent, to gather and report system and other monitoring 
data to Check_MK enabled
+               Nagios/Icigna centralized monitoring servers.
+       </longdescription>
+       <use>
+               <flag name="logwatch">Install check_mk-agent logwatch 
plugin.</flag>
+               <flag name="smart">Install check_mk-agent S.M.A.R.T 
plugin.</flag>
+               <flag name="mysql">Install check_mk-agent mysql plugin.</flag>
+               <flag name="postgres">Install check_mk-agent postgres 
plugin.</flag>
+               <flag name="apache_status">Install check_mk-agent apache-status 
plugin.</flag>
+               <flag name="nfsexports">Install check_mk-agent nfsexports 
plugin.</flag>
+               <flag name="zypper">Install check_mk-agent zypper plugin.</flag>
+       </use>
+       <upstream>
+               
<changelog>http://mathias-kettner.com/check_mk_download.html</changelog>
+               <doc>http://mathias-kettner.com/checkmk.html</doc>
+       </upstream>
+</pkgmetadata>

Reply via email to