summaryrefslogtreecommitdiff
path: root/net-analyzer/nagios-check_multiple
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nagios-check_multiple')
-rw-r--r--net-analyzer/nagios-check_multiple/Manifest1
-rw-r--r--net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1-r1.ebuild46
2 files changed, 47 insertions, 0 deletions
diff --git a/net-analyzer/nagios-check_multiple/Manifest b/net-analyzer/nagios-check_multiple/Manifest
index d6ef6504e1c4..0a596c7b1a98 100644
--- a/net-analyzer/nagios-check_multiple/Manifest
+++ b/net-analyzer/nagios-check_multiple/Manifest
@@ -1,3 +1,4 @@
DIST nagios-check_multiple-0.0.1.tar.gz 9376 BLAKE2B 2db464b7edd4aa704560a3f16a5d70e4cdef7cd35284e3c679f3e10e5ef6eaaba19dc361efbb10a77f87c14726439869e4b415fe7e393a1d7ac23233b3bfa66a SHA512 a75bcd821afc6daca612f42c552fb965a3068dc04a94df41ff41d36928c764d44bcf72e1bd6d776bf4b443c73fc3946c0a91443a562019fcd1b6e8687d0ebcd2
+EBUILD nagios-check_multiple-0.0.1-r1.ebuild 1363 BLAKE2B b694b57a674daa4d5f2d24818952b3073ddaa8b4a0e7c3817c5bc58ab0c61e2a5c48a362c34e61694638879283d5e4096aee199b7f90777db67911b6fe1210ec SHA512 0d5e0b7f3fc32ad9f592c5db2d2cf617a167a86ac5610db531570825d59bca2b67e76a8c3e310d8fa4eaf1cd30a7217a39d8125e7c15eb588d941b1766b84212
EBUILD nagios-check_multiple-0.0.1.ebuild 1357 BLAKE2B bd94906a71835708c96c225886dae2212cb17b585a4b39c3df3efadc83fdf9f5319029a5ff4406c7adbe3ee50d00c2bf812e902743483c1953770aa6570b79fb SHA512 ac1e10889763e24662d02f640b3174635d2fed615a2e99dfce317dda93a3b847245aeab593bb999ae583228963d6a4df196699569c38a09838dcbee05d3cbc9b
MISC metadata.xml 346 BLAKE2B 16270d3fccdcd1c5519beddf3e520377a2538ca793fc1d0c9e3f1e640db66b562971900d5595754104cc30390661c6ff714ac790868e6aeae719e68c72eb2d0d SHA512 7f773b9c98c57e43fb394a2db6bc357d49c4561f44419aff7867fdc07eece455a473309646e90ed065ab11c64576d4dd764d134403330bd83e9f71e680d5a932
diff --git a/net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1-r1.ebuild b/net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1-r1.ebuild
new file mode 100644
index 000000000000..474031b4927f
--- /dev/null
+++ b/net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{3_8,3_9,3_10} )
+DISTUTILS_USE_SETUPTOOLS=no
+inherit distutils-r1
+
+MY_PN="check_multiple"
+DESCRIPTION="A Nagios plugin to execute multiple checks in parallel"
+HOMEPAGE="https://github.com/clarkbox/check_multiple"
+SRC_URI="https://github.com/clarkbox/check_multiple/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_install() {
+ distutils-r1_src_install
+
+ local nagiosplugindir="/usr/$(get_libdir)/nagios/plugins"
+ dodir "${nagiosplugindir}"
+
+ # Create a symlink from the nagios plugin directory to the /usr/bin
+ # location. The "binary" in /usr/bin should also be a symlink, since
+ # the python machinery allows the user to switch out the
+ # interpreter. We don't want to mess with any of that, so we just
+ # point to whatever the system would use if the user executed
+ # ${MY_PN}.
+ #
+ # The relative symlink is preferred so that if the package is
+ # installed e.g. while in a chroot, the symlink will never point
+ # outside of that chroot.
+ #
+ dosym "../../../bin/${MY_PN}" "${nagiosplugindir}/${MY_PN}"
+}
+
+python_test() {
+ "${EPYTHON}" -m unittest -v lib/check_multiple/check_multiple.py \
+ || die "test suite failed"
+}