Initial commit, ebuild by me, closes #484654
authorFabian Groffen <grobian@gentoo.org>
Sun, 1 Mar 2015 23:09:16 +0000 (23:09 +0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 1 Mar 2015 23:09:16 +0000 (23:09 +0000)
Package-Manager: portage-2.2.14-prefix/cvs/SunOS i386
Manifest-Sign-Key: 0x5F75F607C5C74E89

app-admin/diamond/ChangeLog [new file with mode: 0644]
app-admin/diamond/Manifest [new file with mode: 0644]
app-admin/diamond/diamond-4.0.ebuild [new file with mode: 0644]
app-admin/diamond/files/diamond.confd [new file with mode: 0644]
app-admin/diamond/files/diamond.initd [new file with mode: 0755]
app-admin/diamond/metadata.xml [new file with mode: 0644]

diff --git a/app-admin/diamond/ChangeLog b/app-admin/diamond/ChangeLog
new file mode 100644 (file)
index 0000000..2fe03fa
--- /dev/null
@@ -0,0 +1,9 @@
+# ChangeLog for app-admin/diamond
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/diamond/ChangeLog,v 1.1 2015/03/01 23:09:12 grobian Exp $
+
+*diamond-4.0 (01 Mar 2015)
+
+  01 Mar 2015; Fabian Groffen <grobian@gentoo.org> +diamond-4.0.ebuild,
+  +files/diamond.confd, +files/diamond.initd, +metadata.xml:
+  Initial commit, ebuild by me, closes #484654
diff --git a/app-admin/diamond/Manifest b/app-admin/diamond/Manifest
new file mode 100644 (file)
index 0000000..7cbd286
--- /dev/null
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX diamond.confd 57 SHA256 41941d406f48b5eca55d9146928eee185820fe27a3708d3fcaa71c3f78bf4adc SHA512 51b037902394b22f957a15ad1479ebdae5ac29384f2b7a5053ea8200bad05dc9c9060cc5c6c1a931e341e99b95327e55b06aaa9a828950533265f9c96a8dff55 WHIRLPOOL 80165d5cf5347dd3abeeec53f4df64d51f7f78445363574b2bc1b8f2fec9f1a0798c4986319dabe6d6a4b6b499c577fc8679b2fc65554107e48e3e13dac4e68b
+AUX diamond.initd 568 SHA256 99184d76c9967c1edfe12b555e7759ca8b6106d7890359e5c1e0a1c3e7016777 SHA512 e7edb84928460bcfe4ab26218b1e367c05fac08f7c0dd13ef1ff33fc627b3684b0a1d0768601968c20fd43edbea8df8917a6aede76902bd3e6e71d23f8980ca1 WHIRLPOOL 7cc69ae79165dd91943a50c1bd56ebd0e07bb71212a35488e71e91041c577991e60c9c65d145894e49914897ab6e10ee9684d418d089f73bd42ae284b45f5dfc
+DIST python-diamond-4.0.tar.gz 491433 SHA256 e84dd3c87b230d524306a07c3fc7c1db1d9796e3748025e8345a4fa18b162256 SHA512 c4a6e63bdc55f9e0ac2fbf3b644be91662635c08ecc864dfaaebf2fe62fb45609c099da63efd93ed498d2dc9e95bbcb64be09f715e21d59b30bce958a96dc56b WHIRLPOOL 2b1f6124001183058cf282d6e9c51bba0878f26308731266f2c31c549bb42db945c579b49b5a34666e0c05ccbda0163135662a11e59a482f8ef031c49c6005ba
+EBUILD diamond-4.0.ebuild 1465 SHA256 e15c0610f4d5c597e6df27d7dd0f3afb35188547e182f35d7412bde978be784d SHA512 1acec7370a925812b884d4300c75b631baacacb4e5e024a2db68ad99db62f45a9a741410390bf01cea456f0c96d16c7ab95a733c8fca6667decc3c587e891f03 WHIRLPOOL 22e29fedd11ee41348b7e7fa76ca4ba4669f1b5e1fced3bf3b662504464243fb91fe724e8d386a5750002349710087b95b9ca7f5ae1fa73e614de604f4ca8468
+MISC ChangeLog 416 SHA256 2f69d424ecb89f33b9ce6748a72459cc1ae098349f84c837e0af9ef1848a0f05 SHA512 942ca8f2075dae3b8afdabd899602c180556f886b682b412895f2876b42b1814d2c98fa47e7ba3e4792ff0483df68f68b09c525b0a91e60d93d172d88e2ea8fb WHIRLPOOL 114de37c8be304ce799c7351eb5b078189b40478da990b3d9564ac74d7ca466e4f8b124b28ba7f048c87b79fe0610a7bdbc88f6f6c04367159efd53c4a5a60dc
+MISC metadata.xml 586 SHA256 d167f488ef5b8f3b813586538e8e355dc4a0a92bd8cf1ff21ffacbc04a292de7 SHA512 97a0367b6b759a8d79427763d2fe1c37c9038406653821a83d7669a39d059170ff6d122e9f7baa31c2c8ce6d7b7c3478dcebfae55a6a6a7403816b2a6fc451a8 WHIRLPOOL 410db9ae30c5a7516b252e92abbc8a9dbb62c885034c8ee3fabe4e005e373c721927bd7d8f1723a559f9d8b29d57927074011dc449442e8fb7f40e1d4ff32629
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iEYEAREIAAYFAlTznBkACgkQX3X2B8XHTond/gCfRBFPYLiGfkE/e9U2KFlPpBdK
+UEAAn2h9ETiYFbQRBNpGQ7XfurYHpFdT
+=Vcxh
+-----END PGP SIGNATURE-----
diff --git a/app-admin/diamond/diamond-4.0.ebuild b/app-admin/diamond/diamond-4.0.ebuild
new file mode 100644 (file)
index 0000000..8b319f5
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/diamond/diamond-4.0.ebuild,v 1.1 2015/03/01 23:09:12 grobian Exp $
+
+EAPI=5
+
+if [[ ${PV} = 9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/python-diamond/Diamond.git"
+else
+       SRC_URI="https://github.com/python-diamond/Diamond/archive/v${PV}.tar.gz -> python-diamond-${PV}.tar.gz"
+       KEYWORDS="~x86 ~amd64"
+fi
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python daemon that collects and publishes system metrics"
+HOMEPAGE="https://github.com/python-diamond/Diamond"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test mongo mysql snmp redis"
+
+RDEPEND="dev-python/configobj
+       dev-python/setproctitle
+       mongo? ( dev-python/pymongo )
+       mysql? ( dev-python/mysql-python )
+       snmp? ( dev-python/pysnmp )
+       redis? ( dev-python/redis-py )"
+DEPEND="${RDEPEND}
+       test? ( dev-python/mock )"
+
+S=${WORKDIR}/Diamond-${PV}
+
+src_prepare() {
+       # adjust for Prefix
+       sed -i \
+               -e '/default="\/etc\/diamond\/diamond.conf"/s:=":="'"${EPREFIX}"':' \
+               bin/diamond* \
+               || die
+
+       distutils-r1_src_prepare
+}
+
+python_test() {
+       "${PYTHON}" ./test.py || die "Tests fail with ${PYTHON}"
+}
+
+python_install() {
+       export VIRTUAL_ENV=1
+       distutils-r1_python_install
+       mv "${ED}"/usr/etc "${ED}"/ || die
+}
+
+src_install() {
+       distutils-r1_src_install
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+       newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/app-admin/diamond/files/diamond.confd b/app-admin/diamond/files/diamond.confd
new file mode 100644 (file)
index 0000000..ad99392
--- /dev/null
@@ -0,0 +1,2 @@
+# command line options for running diamond
+DIAMOND_OPTS=
diff --git a/app-admin/diamond/files/diamond.initd b/app-admin/diamond/files/diamond.initd
new file mode 100755 (executable)
index 0000000..db05f47
--- /dev/null
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/diamond/files/diamond.initd,v 1.1 2015/03/01 23:09:12 grobian Exp $
+
+depend() {
+       need net
+}
+
+start() {
+       ebegin "Starting ${SVCNAME}"
+       start-stop-daemon --start --exec /usr/bin/diamond --pidfile /run/${SVCNAME}.pid -- -c /etc/diamond/${SVCNAME}.conf ${DIAMOND_OPTS}
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping ${SVCNAME}"
+       start-stop-daemon --stop --pidfile /run/${SVCNAME}.pid --name diamond
+       eend $?
+}
diff --git a/app-admin/diamond/metadata.xml b/app-admin/diamond/metadata.xml
new file mode 100644 (file)
index 0000000..80b9d7b
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer>
+               <email>grobian@gentoo.org</email>
+               <name>Fabian Groffen</name>
+       </maintainer>
+       <longdescription lang="en">
+               Diamond is a python daemon that collects system metrics and
+               publishes them to Graphite (and others). It is capable of
+               collecting cpu, memory, network, i/o, load and disk metrics.
+               Additionally, it features an API for implementing custom
+               collectors for gathering metrics from almost any source.
+       </longdescription>
+</pkgmetadata>