Add 'monitorix/' from commit 'dce52b500fa14b2e916e14bf3da443cb33626969'

git-subtree-dir: monitorix
git-subtree-mainline: d0e3989a33
git-subtree-split: dce52b500f
This commit is contained in:
Cedric Girard 2022-01-18 15:19:07 +01:00
commit f9869f2198
3 changed files with 92 additions and 0 deletions

35
monitorix/.SRCINFO Normal file
View File

@ -0,0 +1,35 @@
pkgbase = monitorix
pkgdesc = A lightweight system monitoring tool that uses rrd databases.
pkgver = 3.13.1
pkgrel = 1
url = https://www.monitorix.org
install = readme.install
arch = any
license = GPLv2
depends = perl
depends = perl-cgi
depends = perl-mailtools
depends = perl-mime-lite
depends = perl-libwww
depends = perl-dbi
depends = perl-xml-simple
depends = perl-config-simple
depends = perl-config-general
depends = rrdtool
depends = perl-http-server-simple
optdepends = anything-sync-daemon: offload your databases to tmpfs to save i/o to your disk.
optdepends = hddtemp: enable support for hdd temp monitoring.
optdepends = lm_sensors: enable support for system temp monitoring.
optdepends = net-tools: for netstat monitoring
optdepends = nvidia: enable support for nVidia card temp and usage monitoring.
optdepends = perl-dbd-mysql: for mysql monitoring
optdepends = smartmontools: enable support for hdd bad sector monitoring.
optdepends = terminus-font: if graphs do not contain characters, you may need this font package.
conflicts = monitorix-git
backup = etc/monitorix/monitorix.conf
backup = etc/monitorix.conf
source = http://www.monitorix.org/monitorix-3.13.1.tar.gz
sha256sums = ea2e579978e7c1e1ac924fc0f5477c488e5b8bb8a2f2ce5b2657fcb84d29d949
pkgname = monitorix

51
monitorix/PKGBUILD Normal file
View File

@ -0,0 +1,51 @@
# Contributor: graysky <graysky AT archlinux dot us>
pkgname=monitorix
pkgver=3.13.1
pkgrel=1
pkgdesc='A lightweight system monitoring tool that uses rrd databases.'
arch=('any')
url='https://www.monitorix.org'
license=('GPLv2')
depends=('perl' 'perl-cgi' 'perl-mailtools' 'perl-mime-lite' 'perl-libwww'
'perl-dbi' 'perl-xml-simple' 'perl-config-simple' 'perl-config-general'
'rrdtool' 'perl-http-server-simple')
optdepends=(
'anything-sync-daemon: offload your databases to tmpfs to save i/o to your disk.'
'hddtemp: enable support for hdd temp monitoring.'
'lm_sensors: enable support for system temp monitoring.'
'net-tools: for netstat monitoring'
'nvidia: enable support for nVidia card temp and usage monitoring.'
'perl-dbd-mysql: for mysql monitoring'
'smartmontools: enable support for hdd bad sector monitoring.'
'terminus-font: if graphs do not contain characters, you may need this font package.')
conflicts=("$pkgname-git")
backup=("etc/$pkgname/$pkgname.conf" "etc/$pkgname.conf")
install=readme.install
source=("http://www.$pkgname.org/$pkgname-$pkgver.tar.gz")
sha256sums=('ea2e579978e7c1e1ac924fc0f5477c488e5b8bb8a2f2ce5b2657fcb84d29d949')
prepare() {
cd "$pkgname-$pkgver"
# use Arch default location for http servers and enable built-in httpd
sed -i -e '/^base_dir/ s,var\/lib\/monitorix\/www,srv\/http\/monitorix,' \
-i -e '/^<httpd_builtin>/{$!N; s/y/n/}' $pkgname.conf
# apply fix for RRDtool 1.5 scheduled to be included in the next release
sed -i '/$macti = $minac/ s,"",0,' lib/system.pm
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" BASEDIR=/srv/http/monitorix \
WWWDIR=/srv/http/monitorix install-systemd-all
# Arch provides the license so do not duplicate it
rm -f "$pkgdir/usr/share/doc/$pkgname/COPYING"
# remove unneed files
rm -f "$pkgdir/usr/share/doc/$pkgname/README.OpenBSD"
rm -f "$pkgdir/usr/share/doc/$pkgname/README.NetBSD"
rm -f "$pkgdir/usr/share/doc/$pkgname/README.FreeBSD"
}

6
monitorix/readme.install Normal file
View File

@ -0,0 +1,6 @@
post_remove() {
echo '----------------------------------------------------------------------'
echo 'To remove all traces of monitorix:'
echo 'rm -rf /var/lib/monitorix /srv/http/monitorix /var/log/monitorix'
echo '----------------------------------------------------------------------'
}