Initial import
This commit is contained in:
commit
904ad30298
3 changed files with 121 additions and 0 deletions
33
.SRCINFO
Normal file
33
.SRCINFO
Normal file
|
@ -0,0 +1,33 @@
|
|||
pkgbase = monitorix
|
||||
pkgdesc = A lightweight system monitoring tool that uses rrd databases.
|
||||
pkgver = 3.7.0
|
||||
pkgrel = 2
|
||||
url = http://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 = nvidia: enable support for nVidia card temp and usage 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.7.0.tar.gz
|
||||
sha256sums = b63d2bf2319a3c6086ebb899f048bf9e1298bdd43e8b0396d3ea66d4d819fef0
|
||||
|
||||
pkgname = monitorix
|
||||
|
49
PKGBUILD
Normal file
49
PKGBUILD
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Contributor: graysky <graysky AT archlinux dot us>
|
||||
|
||||
pkgname=monitorix
|
||||
pkgver=3.7.0
|
||||
pkgrel=2
|
||||
pkgdesc='A lightweight system monitoring tool that uses rrd databases.'
|
||||
arch=('any')
|
||||
url='http://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.'
|
||||
'nvidia: enable support for nVidia card temp and usage 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=('b63d2bf2319a3c6086ebb899f048bf9e1298bdd43e8b0396d3ea66d4d819fef0')
|
||||
|
||||
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"
|
||||
}
|
39
readme.install
Normal file
39
readme.install
Normal file
|
@ -0,0 +1,39 @@
|
|||
post_install() {
|
||||
echo '----------------------------------------------------------------------'
|
||||
echo 'Consider having your rrd databases for monitorix reside in RAM.'
|
||||
echo 'https://aur.archlinux.org/packages/anything-sync-daemon'
|
||||
echo '----------------------------------------------------------------------'
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
echo '----------------------------------------------------------------------'
|
||||
echo 'To remove all traces of monitorix from your system, you must manually'
|
||||
echo 'remove the following dir trees (doing so will delete your databases):'
|
||||
echo
|
||||
echo 'rm -rf /var/lib/monitorix /srv/http/monitorix /var/log/monitorix'
|
||||
echo
|
||||
echo 'If you are using anything-sync-daemon, remember to remove the potential'
|
||||
echo 'entry in /etc/asd.conf if you created one for the monitorix db files'
|
||||
echo '----------------------------------------------------------------------'
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
## arg 1: the new package version
|
||||
## arg 2: the old package version
|
||||
oldpkgver=${2%-*}
|
||||
|
||||
if [[ $oldpkgver < 3.5 ]]; then
|
||||
echo '------------------------------------------------------------------------'
|
||||
echo ' WARNING:'
|
||||
echo
|
||||
echo 'Version 3.50 moves /etc/monitorix.conf -> /etc/monitorix/monitorix.conf'
|
||||
echo
|
||||
echo 'Pacman should save your old config file to /etc/monitorix.conf.pacsave'
|
||||
echo 'You MUST compare it to /etc/monitorix/monitorix.conf with a util like vimdiff'
|
||||
echo
|
||||
echo 'Do NOT change two key vars in this file:'
|
||||
echo ' base_dir'
|
||||
echo ' base_cgi'
|
||||
echo '------------------------------------------------------------------------'
|
||||
fi
|
||||
}
|
Loading…
Reference in a new issue