]> Frank Brehm's Git Trees - portage.git/commitdiff
Added net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.2.1.4.ebuild
authorFrank Brehm <frank.brehm@profitbricks.com>
Fri, 3 Jan 2014 15:00:18 +0000 (16:00 +0100)
committerFrank Brehm <frank.brehm@profitbricks.com>
Fri, 3 Jan 2014 15:00:18 +0000 (16:00 +0100)
net-analyzer/pb-nagios-plugins/Manifest [new file with mode: 0644]
net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.2.1.4.ebuild [new file with mode: 0644]

diff --git a/net-analyzer/pb-nagios-plugins/Manifest b/net-analyzer/pb-nagios-plugins/Manifest
new file mode 100644 (file)
index 0000000..92c8f75
--- /dev/null
@@ -0,0 +1 @@
+EBUILD pb-nagios-plugins-1.2.1.4.ebuild 2276 SHA256 31ff91a3ff29bf0a18c5a8b3515be2c24c07fbaea2dbf3b2b26448b0df038f9e SHA512 0a84c7aa5d6f4bed8f58545b3266799cf048b595af6c61a6d5e1bc91afefd3f74fca0c7f855bf2080e56df555d266f8d246799ab5bb615d025ebad8ebdf6673d WHIRLPOOL 14d6dceb82235c22bea44f6b6bb0e6e4348675be37350b70f3fc8196877700603238888fa43a564536a4cd16c5b368b891f974c0322a59205b87d46f462a3703
diff --git a/net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.2.1.4.ebuild b/net-analyzer/pb-nagios-plugins/pb-nagios-plugins-1.2.1.4.ebuild
new file mode 100644 (file)
index 0000000..edb43bd
--- /dev/null
@@ -0,0 +1,90 @@
+# 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="git://git/python/nagios-plugin.git"
+
+inherit git-2 distutils-r1 user versionator
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="doc megaraid smart"
+
+EGIT_BRANCH="develop"
+EGIT_COMMIT=$(replace_version_separator 3 '-')
+
+RDEPEND="
+       || (
+               virtual/python-argparse
+               dev-python/argparse
+       )
+       ~dev-python/nagios-plugin-${PV}
+       smart? ( sys-apps/smartmontools )
+       megaraid? ( sys-block/megacli )
+"
+DEPEND="
+       ${RDEPEND}
+       doc? (  dev-python/epydoc
+                       dev-python/docutils
+       )
+"
+
+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 doc; then
+               einfo "Installing documentation ..."
+               dodir "/usr/share/doc/${PF}"
+               dodir "/usr/share/doc/${PF}/html"
+               dodir "/usr/share/doc/${PF}/pdf"
+
+               einfo "Creating epydoc html documentation"
+               epydoc --html -v -o "${ED}/usr/share/doc/${PF}/html" "${S}/nagios" || ewarn "Could not create epydoc html documentation"
+               einfo "Creating epydoc pdf documentation"
+               epydoc --pdf -o "${ED}/usr/share/doc/${PF}/pdf" "${S}/nagios" || ewarn "Could not create epydoc pdf documentation"
+
+       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
+
+}
+
+