mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
app-metrics/carbonapi-booking: intial commit
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DIST carbonapi-booking-0.3.0.tar.gz 1395080 BLAKE2B e5ebe20a4833f17919f0a14e091b06b5270d7dd8880fa87600454ac33b7df7600d1428f0b2e06c65a1a36796e2eb026e8c47b98444dce168cec0e965ebee9d69 SHA512 327af89fd86661ccca9d7250e70b66f03089841b20e3c51128bcbb835a91d553d952928d991424f9bbe1fea235cd9e6242784d8cbd828725ba5b2cfb64328487
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module
|
||||
|
||||
MY_PN=${PN%-booking}
|
||||
DESCRIPTION="High-performance Graphite front-end, Booking.com fork"
|
||||
HOMEPAGE="https://github.com/bookingcom/carbonapi"
|
||||
SRC_URI="https://github.com/bookingcom/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
acct-group/carbon
|
||||
acct-user/carbon"
|
||||
BDEPEND=""
|
||||
|
||||
src_install() {
|
||||
insinto /etc/carbonapi
|
||||
doins -r "${S}"/config/*
|
||||
dobin carbonapi carbonzipper
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}.initd carbonapi
|
||||
newconfd "${FILESDIR}"/${PN}.confd carbonapi
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
#CONFIG_FILE=/etc/carbonapi/carbonapi.yaml
|
||||
|
||||
# user and group to run carbonapi as
|
||||
#USER=carbon
|
||||
#GROUP=carbon
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2023 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Graphite whisper metrics renderer."
|
||||
|
||||
carbonapi_config=${CONFIG_FILE:-/etc/carbonapi/${SVCNAME}.yaml}
|
||||
|
||||
command="/usr/bin/carbonapi"
|
||||
command_args="-config ${carbonapi_config}"
|
||||
pidfile="/run/carbonapi/${SVCNAME}.pid"
|
||||
user=${USER:-carbon}
|
||||
group=${GROUP:-carbon}
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
mkdir -p "${pidfile%/*}"
|
||||
chown ${user}:${group} "${pidfile%/*}"
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
rm -f "${pidfile}"
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
start-stop-daemon --start --pidfile "${pidfile}" \
|
||||
--make-pidfile --background \
|
||||
--user ${user} --group ${group} \
|
||||
--exec ${command} -- \
|
||||
${command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${SVCNAME}"
|
||||
start-stop-daemon --stop --exec ${command} --pidfile "${pidfile}"
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>grobian@gentoo.org</email>
|
||||
<name>Fabian Groffen</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">bookingcom/carbonapi</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user