commit:     2008355b598e298bdfd90213e8e9b2fb20c51516
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 11 09:21:41 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 09:22:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2008355b

app-admin/diamond: version bump to v4.0.515

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 app-admin/diamond/Manifest               |  1 +
 app-admin/diamond/diamond-4.0.515.ebuild | 70 ++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)

diff --git a/app-admin/diamond/Manifest b/app-admin/diamond/Manifest
index de109ba841b..3ca8ebfc740 100644
--- a/app-admin/diamond/Manifest
+++ b/app-admin/diamond/Manifest
@@ -1 +1,2 @@
+DIST python-diamond-4.0.515.tar.gz 620337 SHA256 
3e8a1ff06b18d70a850d10689b3c8e041e91237aa8dee16db824ec368c04949f SHA512 
8516e46f4f75400a55ca0127789344a897fc7cd6c10f0f8379d30db58de5a09ae676e340371cdf1a0c9ca894fd355699a1a0f430bfad148e32157d5eb97aaef5
 WHIRLPOOL 
39fe60e68b28e706a615c9b6068384b2ffac0710d06f26988341e1f032db4558d0018d7d746c7eef12ad0c0e04969decddd839f6cdc7fc1c01aca31c91e2591e
 DIST python-diamond-4.0.tar.gz 491433 SHA256 
e84dd3c87b230d524306a07c3fc7c1db1d9796e3748025e8345a4fa18b162256 SHA512 
c4a6e63bdc55f9e0ac2fbf3b644be91662635c08ecc864dfaaebf2fe62fb45609c099da63efd93ed498d2dc9e95bbcb64be09f715e21d59b30bce958a96dc56b
 WHIRLPOOL 
2b1f6124001183058cf282d6e9c51bba0878f26308731266f2c31c549bb42db945c579b49b5a34666e0c05ccbda0163135662a11e59a482f8ef031c49c6005ba

diff --git a/app-admin/diamond/diamond-4.0.515.ebuild 
b/app-admin/diamond/diamond-4.0.515.ebuild
new file mode 100644
index 00000000000..83e5f00615c
--- /dev/null
+++ b/app-admin/diamond/diamond-4.0.515.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+if [[ ${PV} = 9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/python-diamond/Diamond.git";
+       S=${WORKDIR}/diamond-${PV}
+else
+       
SRC_URI="https://github.com/python-diamond/Diamond/archive/v${PV}.tar.gz -> 
python-diamond-${PV}.tar.gz"
+       KEYWORDS="~amd64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+       S=${WORKDIR}/Diamond-${PV}
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 prefix
+
+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 )
+       !kernel_linux? ( >=dev-python/psutil-3 )"
+DEPEND="${RDEPEND}
+       test? ( dev-python/mock )"
+
+src_prepare() {
+       # adjust for Prefix
+       hprefixify bin/diamond*
+
+       # fix the version (not set in GitHub archive)
+       sed -i -e "s/__VERSIONTOKENHERE__/${PV}/" src/diamond/version.py.tmpl 
|| die
+       # fix symlink out of place
+       rm README.md || die
+       cp docs/index.md README.md || 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
+       rm "${ED}"/etc/diamond/*.windows  # won't need these
+       sed -i \
+               -e '/pid_file =/s:/var/run:/run:' \
+               "${ED}"/etc/diamond/diamond.conf.example || die
+       hprefixify "${ED}"/etc/diamond/diamond.conf.example
+}
+
+src_install() {
+       distutils-r1_src_install
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+       newconfd "${FILESDIR}"/${PN}.confd ${PN}
+       keepdir /var/log/diamond
+}

Reply via email to