diff --git a/../gentoo/net-analyzer/check_mk/check_mk-1.2.4_p5-r1.ebuild b/net-analyzer/check_mk/check_mk-1.2.8_p14.ebuild index 721bed0..e4b8286 100644 --- a/net-analyzer/check_mk/check_mk-1.2.8_p14.ebuild +++ b/net-analyzer/check_mk/check_mk-1.2.8_p14.ebuild @@ -6,7 +6,7 @@ EAPI="5" PYTHON_COMPAT=( python2_7 ) -inherit eutils toolchain-funcs python-r1 +inherit eutils toolchain-funcs python-r1 systemd DESCRIPTION="General purpose Nagios/Icinga plugin for retrieving data" HOMEPAGE="http://mathias-kettner.de/check_mk.html" @@ -17,13 +17,14 @@ MY_PV="${MY_P/check_mk-/}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="agent-only apache_status dmi_sysinfo livestatus logwatch mysql - nfsexports oracle postgres smart wato xinetd zypper" +IUSE="agent-only apache_status livestatus logwatch mysql + nfsexports oracle postgres smart systemd wato xinetd zypper" DEPEND="wato? ( app-admin/sudo ) + livestatus? ( !!net-analyzer/mk-livestatus ) xinetd? ( sys-apps/xinetd ) !agent-only? ( || ( net-analyzer/nagios-core net-analyzer/icinga ) ) - !agent-only? ( www-servers/apache www-apache/mod_python ) + !agent-only? ( www-servers/apache[-apache2_mpms_worker] www-apache/mod_python ) media-libs/libpng:0" RDEPEND="${DEPEND}" @@ -83,23 +84,25 @@ src_compile() { # compile waitmax cd "${S}"/usr/share/check_mk/agents || die "Couldn't cd to ${S}/usr/share/check_mk/agents" - if [[ -f waitmax ]]; then - rm waitmax || die "Couldn't delete precompiled waitmax file" - fi - sed -i -e 's#gcc -s -o waitmax waitmax\.c#gcc -o waitmax waitmax.c#' "${S}"/usr/share/check_mk/agents/Makefile || die "Couldn't modify remove strip from waitmax Makefile" - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" || die "Couldn't compile waitmax" + rm -f waitmax + $(tc-getCC) ${CFLAGS} -o waitmax{,.c} ${LDFLAGS} || die "Couldn't compile waitmax" # Fix broken png files pngfix -q --out=out.png "${S}/usr/share/check_mk/web/htdocs/images/icons/bookcase.png" mv -f out.png "${S}/usr/share/check_mk/web/htdocs/images/icons/bookcase.png" || die - pngfix -q --out=out.png "${S}/usr/share/check_mk/web/htdocs/images/icon_auditlog.png" - mv -f out.png "${S}/usr/share/check_mk/web/htdocs/images/icon_auditlog.png" || die - pngfix -q --out=out.png "${S}/usr/share/check_mk/web/htdocs/images/button_auditlog_lo.png" - mv -f out.png "${S}/usr/share/check_mk/web/htdocs/images/button_auditlog_lo.png" || die } src_install() { if ! use agent-only; then + # pnp4nagios is installed in /usr/share/pnp and configured in /pnp/ + # location in apache; so, some clean up is necessary although aliasing + # reverse aliasing the directory will also work. + sed 's,/pnp4nagios/,/pnp/,g' -i \ + usr/share/check_mk/check_mk_templates.cfg \ + usr/share/check_mk/notifications/mail \ + usr/share/check_mk/web/htdocs/wato.py \ + usr/share/check_mk/web/plugins/{icons/builtin.py,wato/backup_domains.py} + # Apache configuration insinto /etc/apache2/modules.d doins etc/apache2/modules.d/zzz_check_mk.conf @@ -118,7 +121,7 @@ EOF # check_mk configuration keepdir /etc/check_mk insinto /etc/check_mk - doins etc/check_mk/main.mk + doins "${FILESDIR}"/main.mk doins etc/check_mk/main.mk-${MY_PV} doins etc/check_mk/multisite.mk doins etc/check_mk/multisite.mk-${MY_PV} @@ -155,6 +158,7 @@ EOF keepdir /var/lib/check_mk/cache keepdir /var/lib/check_mk/counters keepdir /var/lib/check_mk/logwatch + keepdir /var/lib/check_mk/log keepdir /var/lib/check_mk/notify keepdir /var/lib/check_mk/packages insinto /var/lib/check_mk/packages @@ -187,6 +191,8 @@ EOF fowners -R root:${mydaemon} /var/lib/check_mk/counters fperms 0775 /var/lib/check_mk/notify fowners -R root:${mydaemon} /var/lib/check_mk/notify + fperms 0775 /var/lib/check_mk/log + fowners -R root:${mydaemon} /var/lib/check_mk/log fperms 0775 /var/lib/check_mk/logwatch fowners -R root:${mydaemon} /var/lib/check_mk/logwatch fperms 0775 /var/lib/check_mk/cache @@ -205,8 +211,9 @@ EOF if use xinetd; then insinto /etc/xinetd.d - newins usr/share/check_mk/agents/xinetd.conf check_mk + newins usr/share/check_mk/agents/cfg_examples/xinetd.conf check_mk fi + use systemd && systemd_dounit usr/share/check_mk/agents/cfg_examples/check_mk{.socket,@.service} keepdir /usr/lib/check_mk_agent/local keepdir /usr/lib/check_mk_agent/plugins @@ -246,7 +253,7 @@ EOF # Install the check_mk_agent logwatch plugin if use logwatch; then insinto /etc/check_mk - doins usr/share/check_mk/agents/logwatch.cfg + doins usr/share/check_mk/agents/cfg_examples/logwatch.cfg exeinto /usr/lib/check_mk_agent/plugins doexe usr/share/check_mk/agents/plugins/mk_logwatch fi @@ -292,12 +299,6 @@ EOF exeinto /usr/lib/check_mk_agent/plugins doexe usr/share/check_mk/agents/plugins/nfsexports fi - - # Install the check_mk_agent dmi_sysinfo plugin - if use dmi_sysinfo; then - exeinto /usr/lib/check_mk_agent/plugins - doexe usr/share/check_mk/agents/plugins/dmi_sysinfo - fi } pkg_postinst() {