Gentoo Archives: gentoo-commits

From: "罗百科" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/grafana-bin/
Date: Mon, 20 Mar 2023 08:36:11
Message-Id: 1679301366.90fbf5c00ba708c9f473301841041b42953f8f0b.patrick@gentoo
1 commit: 90fbf5c00ba708c9f473301841041b42953f8f0b
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 20 08:35:52 2023 +0000
4 Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 20 08:36:06 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90fbf5c0
7
8 www-apps/grafana-bin: add 9.3.8
9
10 Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
11
12 www-apps/grafana-bin/grafana-bin-9.3.8.ebuild | 66 +++++++++++++++++++++++++++
13 1 file changed, 66 insertions(+)
14
15 diff --git a/www-apps/grafana-bin/grafana-bin-9.3.8.ebuild b/www-apps/grafana-bin/grafana-bin-9.3.8.ebuild
16 new file mode 100644
17 index 000000000000..0e8aae35965c
18 --- /dev/null
19 +++ b/www-apps/grafana-bin/grafana-bin-9.3.8.ebuild
20 @@ -0,0 +1,66 @@
21 +# Copyright 1999-2023 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +inherit systemd
27 +
28 +MY_PN=${PN/-bin/}
29 +MY_PV=${PV/_beta/-beta}
30 +S=${WORKDIR}/${MY_PN}-${MY_PV}
31 +
32 +DESCRIPTION="Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB"
33 +HOMEPAGE="https://grafana.org"
34 +SRC_URI="https://dl.grafana.com/oss/release/grafana-${PV}.linux-amd64.tar.gz -> ${P}.tar.gz"
35 +
36 +RESTRICT="mirror"
37 +LICENSE="AGPL-3"
38 +SLOT="0"
39 +KEYWORDS="-* ~amd64"
40 +
41 +DEPEND="acct-group/grafana
42 + acct-user/grafana"
43 +RDEPEND="${DEPEND}
44 + media-libs/fontconfig
45 + sys-libs/glibc"
46 +
47 +QA_PREBUILT="usr/bin/grafana-*"
48 +QA_PRESTRIPPED=${QA_PREBUILT}
49 +
50 +src_install() {
51 + keepdir /etc/grafana
52 + insinto /etc/grafana
53 + newins "${S}"/conf/sample.ini grafana.ini
54 + rm "${S}"/conf/sample.ini || die
55 +
56 + # Frontend assets
57 + insinto /usr/share/${MY_PN}
58 + doins -r public conf
59 +
60 + dobin bin/grafana-cli
61 + dobin bin/grafana-server
62 +
63 + newconfd "${FILESDIR}"/grafana-r1.confd grafana
64 + newinitd "${FILESDIR}"/grafana.initd grafana
65 + systemd_newunit "${FILESDIR}"/grafana.service grafana.service
66 +
67 + keepdir /var/{lib,log}/grafana
68 + keepdir /var/lib/grafana/{dashboards,plugins}
69 + fowners grafana:grafana /var/{lib,log}/grafana
70 + fowners grafana:grafana /var/lib/grafana/{dashboards,plugins}
71 + fperms 0750 /var/{lib,log}/grafana
72 + fperms 0750 /var/lib/grafana/{dashboards,plugins}
73 +}
74 +
75 +pkg_postinst() {
76 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
77 + # This is a new installation
78 +
79 + elog "${PN} has built-in log rotation. Please see [log.file] section of"
80 + elog "/etc/grafana/grafana.ini for related settings."
81 + elog
82 + elog "You may add your own custom configuration for app-admin/logrotate if you"
83 + elog "wish to use external rotation of logs. In this case, you also need to make"
84 + elog "sure the built-in rotation is turned off."
85 + fi
86 +}