From: Frank Brehm Date: Sun, 9 Feb 2014 11:20:19 +0000 (+0100) Subject: Added net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.5.1.1-r1.ebuild X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=b3de7f1bbf0a5c1d21826656536e054a08da9164;p=portage.git Added net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.5.1.1-r1.ebuild --- diff --git a/net-analyzer/pb-nagios-plugins/Manifest b/net-analyzer/pb-nagios-plugins/Manifest index 92c8f75..0137067 100644 --- a/net-analyzer/pb-nagios-plugins/Manifest +++ b/net-analyzer/pb-nagios-plugins/Manifest @@ -1 +1,2 @@ EBUILD pb-nagios-plugins-1.2.1.4.ebuild 2276 SHA256 31ff91a3ff29bf0a18c5a8b3515be2c24c07fbaea2dbf3b2b26448b0df038f9e SHA512 0a84c7aa5d6f4bed8f58545b3266799cf048b595af6c61a6d5e1bc91afefd3f74fca0c7f855bf2080e56df555d266f8d246799ab5bb615d025ebad8ebdf6673d WHIRLPOOL 14d6dceb82235c22bea44f6b6bb0e6e4348675be37350b70f3fc8196877700603238888fa43a564536a4cd16c5b368b891f974c0322a59205b87d46f462a3703 +EBUILD pb-nagios-plugins-1.5.1.1-r1.ebuild 2262 SHA256 d958c4528c80709c702f2708baa2b102b530dd2fc33e377e8d3eac0c002b5cc0 SHA512 31cb95646a12aeeca7eb1815c0d4599bb4539e182895d8b16f7f45f652f0eda110520a3ee0f4b73ebc82517b67da9629a8dca89bf957d5b382d73d53395a3b60 WHIRLPOOL 62eea49e78233a7cdf6e8ac1bd0dab8a5bbd6bada4bb82fc4a2dd1d4bebc09e562c2690b17d11e6f70d60cebd4f028b46006ce6c13dcb15280e6f677504bbaf3 diff --git a/net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.5.1.1-r1.ebuild b/net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.5.1.1-r1.ebuild new file mode 100644 index 0000000..e65b7e3 --- /dev/null +++ b/net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.5.1.1-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 ) + +DESCRIPTION="Additional Nagios plugins for usage by ProfitBricks." +HOMEPAGE="http://git.pb.local/gitweb/?p=python/nagios-plugin;a=summary" +SRC_URI="" +EGIT_REPO_URI="https://github.com/fbrehm/nagios-plugin.git" + +inherit git-2 distutils-r1 user versionator + +PB_CATEGORY="net-analyzer" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="amd64" +IUSE="megaraid nrpe perl smart" + +EGIT_BRANCH="master" +EGIT_COMMIT=$(replace_version_separator 3 '-') + +RDEPEND=" + || ( + virtual/python-argparse + dev-python/argparse + ) + ~dev-python/nagios-plugin-${PV} + nrpe? ( || ( + net-analyzer/nrpe + virtual/nrpe + ) ) + perl? ( dev-perl/Nagios-Plugin ) + smart? ( sys-apps/smartmontools ) + megaraid? ( sys-block/megacli ) +" +DEPEND=" + ${RDEPEND} +" + +REQUIRED_USE="megaraid? ( smart )" + +pkg_setup() { + elog "Used GIT tag: '${EGIT_COMMIT}'." + distutils-r1_src_prepare +} + +src_install() { + + dodir /usr/lib64 + dosym lib64 /usr/lib + dodir /usr/lib64/nagios/plugins/pb + + distutils-r1_src_install + + use smart || rm ${D}/usr/bin/check_smart_state + + rm -fv ${ED}/usr/lib*/python*/site-packages/*.egg-info + rm -fv ${ED}/usr/lib*/python*/site-packages/nagios/*.py* + rm -fvr ${ED}/usr/lib*/python*/site-packages/nagios/plugin + rm -fvr ${ED}/usr/lib*/python*/site-packages/nagios/__pycache__ + + einfo "Installing debian/changelog and README.txt" + dodoc debian/changelog + dodoc README.txt + + if use nrpe; then + einfo "Performing /usr/share/pb-config-nagios-nrpe-server/nrpe.d/" + dodir /usr/share/pb-config-nagios-nrpe-server/nrpe.d/ + insinto /usr/share/pb-config-nagios-nrpe-server/ + newins etc/nrpe.cfg-gentoo nrpe.cfg + insinto /usr/share/pb-config-nagios-nrpe-server/nrpe.d/ + doins etc/nrpe.d/00_allowed_hosts.cfg + doins etc/nrpe.d/10_pb-check.cfg + fi + + for script in check_procs check_smart_state check_uname check_vg_free check_vg_state ; do + src="${ED}/usr/lib/nagios/plugins/pb/${script}" + link_tgt="../lib/nagios/plugins/pb/${script}" + link="/usr/bin/${script}" + if [ -f "${src}" ] ; then + einfo "Creating symlink ${link} -> ${link_tgt}" + dosym "${link_tgt}" "${link}" + fi + done + +} + +# vim: filetype=ebuild ts=4 sw=4