diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-08-04 08:53:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-08-04 08:53:53 +0100 |
commit | e3872864be25f7421015bef2732fa57c0c9fb726 (patch) | |
tree | 9cb29a544215119b5c5538e37211b994ce1c87ae /dev-python/carbon/carbon-1.1.3-r1.ebuild | |
parent | 480486b52ea64765faf696c88b2c6a26a5a454d4 (diff) |
gentoo resync : 04.08.2018
Diffstat (limited to 'dev-python/carbon/carbon-1.1.3-r1.ebuild')
-rw-r--r-- | dev-python/carbon/carbon-1.1.3-r1.ebuild | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/carbon/carbon-1.1.3-r1.ebuild b/dev-python/carbon/carbon-1.1.3-r1.ebuild new file mode 100644 index 000000000000..43c4daded363 --- /dev/null +++ b/dev-python/carbon/carbon-1.1.3-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) + +inherit distutils-r1 + +DESCRIPTION="Backend data caching and persistence daemon for Graphite" +HOMEPAGE="http://graphite.wikidot.com/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="Apache-2.0" +KEYWORDS="~amd64 ~x86 ~x64-solaris" + +# whisper appears to have been missed from listing in install_requires in setup.py +RDEPEND=" + dev-python/twisted[${PYTHON_USEDEP}] + dev-python/cachetools[${PYTHON_USEDEP}] + dev-python/txAMQP[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + =dev-python/whisper-${PV}*[${PYTHON_USEDEP}]" + +python_prepare_all() { + # bug #661340, excerpt from upstream, next release should have it + sed -i -e "s/'r+'/'rb+'/" lib/carbon/log.py || die + + # Do not install the configuration and data files. We install them + # somewhere sensible by hand. + sed -i -e '/data_files=install_files,/d' setup.py || die + # We want FHS-style paths instead of /opt/graphite + export GRAPHITE_NO_PREFIX=yes + distutils-r1_python_prepare_all +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /etc/carbon + doins conf/* + + keepdir /var/log/carbon /var/lib/carbon/{whisper,lists,rrd} + + newinitd "${FILESDIR}"/carbon.initd2 carbon-cache + newinitd "${FILESDIR}"/carbon.initd2 carbon-relay + newinitd "${FILESDIR}"/carbon.initd2 carbon-aggregator + + newconfd "${FILESDIR}"/carbon.confd carbon-cache + newconfd "${FILESDIR}"/carbon.confd carbon-relay + newconfd "${FILESDIR}"/carbon.confd carbon-aggregator +} + +pkg_postinst() { + einfo 'This ebuild installs carbon into FHS-style paths.' + einfo 'You will probably have to set GRAPHITE_CONF_DIR to /etc/carbon' + einfo 'and GRAPHITE_STORAGE_DIR to /var/lib/carbon to make use of this' + einfo '(see /etc/carbon/carbon.conf.example).' + einfo ' ' + einfo 'OpenRC init script supports multiple instances !' + einfo 'Example to run an instance b of carbon-cache :' + einfo ' ln -s /etc/init.d/carbon-cache /etc/init.d/carbon-cache.b' + einfo ' cp /etc/conf.d/carbon-cache /etc/conf.d/carbon-cache.b' +} |