Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-misc/monitorix/
Date: Fri, 07 Jan 2022 05:16:56
Message-Id: 1641532593.36e1ecce4533635b0b911a3fa28d6bcb59ae3596.sam@gentoo
1 commit: 36e1ecce4533635b0b911a3fa28d6bcb59ae3596
2 Author: Pedro Arizmendi <dwosky <AT> pm <DOT> me>
3 AuthorDate: Thu Dec 30 10:15:40 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 7 05:16:33 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36e1ecce
7
8 www-misc/monitorix: Added missing css styles
9
10 Signed-off-by: Pedro Arizmendi <dwosky <AT> pm.me>
11 Bug: https://bugs.gentoo.org/830233
12 Package-Manager: Portage-3.0.28, Repoman-3.0.3
13 Closes: https://github.com/gentoo/gentoo/pull/23581
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 www-misc/monitorix/monitorix-3.13.1-r1.ebuild | 93 +++++++++++++++++++++++++++
17 1 file changed, 93 insertions(+)
18
19 diff --git a/www-misc/monitorix/monitorix-3.13.1-r1.ebuild b/www-misc/monitorix/monitorix-3.13.1-r1.ebuild
20 new file mode 100644
21 index 000000000000..a6ac6b69d076
22 --- /dev/null
23 +++ b/www-misc/monitorix/monitorix-3.13.1-r1.ebuild
24 @@ -0,0 +1,93 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI="7"
29 +
30 +inherit systemd optfeature
31 +
32 +DESCRIPTION="A lightweight system monitoring tool"
33 +HOMEPAGE="https://www.monitorix.org/"
34 +SRC_URI="https://www.monitorix.org/${P}.tar.gz"
35 +
36 +LICENSE="GPL-2+"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~x86"
39 +IUSE=""
40 +
41 +RDEPEND="
42 + acct-user/monitorix
43 + acct-group/monitorix
44 + dev-perl/Config-General
45 + dev-perl/DBI
46 + dev-perl/HTTP-Server-Simple
47 + dev-perl/IO-Socket-SSL
48 + dev-perl/libwww-perl
49 + dev-perl/MIME-Lite
50 + dev-perl/XML-Simple
51 + net-analyzer/rrdtool[graph,perl]
52 + dev-perl/CGI"
53 +
54 +src_prepare() {
55 + # Put better Gentoo defaults in the configuration file.
56 + sed -e "s|\(base_dir.*\)/usr/share/${PN}|\1/usr/share/${PN}/htdocs|" \
57 + -e "s|\(secure_log.*\)/var/log/secure|\1/var/log/auth.log|" \
58 + -e "s|nobody|${PN}|g" -i ${PN}.conf || die
59 + # Update systemd binary location
60 + sed -e "s|/usr/bin|/usr/sbin|g" -i docs/${PN}.service || die
61 + eapply_user
62 +}
63 +
64 +# Override compile phase
65 +src_compile() { :; }
66 +
67 +src_install() {
68 + dosbin ${PN}
69 +
70 + newinitd "${FILESDIR}/monitorix" ${PN}
71 +
72 + insinto /etc/monitorix
73 + doins ${PN}.conf
74 +
75 + keepdir /etc/${PN}/conf.d
76 +
77 + insinto /etc/logrotate.d
78 + newins docs/${PN}.logrotate ${PN}
79 +
80 + dodoc Changes README{,.nginx} docs/${PN}-{alert.sh,apache.conf,lighttpd.conf}
81 + doman man/man5/${PN}.conf.5
82 + doman man/man8/${PN}.8
83 +
84 + insinto /var/lib/${PN}/www
85 + doins logo_bot.png logo_top.png ${PN}ico.png
86 +
87 + insinto /var/lib/${PN}/www/css
88 + doins css/*.css
89 +
90 + keepdir /var/lib/${PN}/www/imgs
91 + fowners monitorix:monitorix /var/lib/${PN}/www/imgs
92 +
93 + exeinto /var/lib/${PN}/www/cgi
94 + doexe ${PN}.cgi
95 +
96 + exeinto /usr/lib/${PN}
97 + doexe lib/*.pm
98 +
99 + keepdir /var/lib/${PN}/usage
100 + insinto /var/lib/${PN}/reports
101 + doins -r reports
102 +
103 + systemd_dounit docs/${PN}.service
104 +}
105 +
106 +pkg_postinst() {
107 + optfeature "disk drive temperatures and health" app-admin/hddtemp
108 + optfeature "email reports/statics" mail-mta/postfix mail-mta/sendmail
109 + optfeature "lm-sensors and GPU temperatures" sys-apps/lm-sensors
110 + optfeature "APC UPS statistics" sys-power/apcupsd
111 + optfeature "Network UPS Tools statistics" sys-power/nut
112 + elog
113 + elog "If you wish to use your own web server:"
114 + elog " Web data can be found at: ${EROOT}/var/lib/${PN}/www/"
115 + elog " Also please check the correct user and group ownership"
116 + elog " of ${EROOT}/var/lib/${PN}/www/imgs/"
117 +}