summaryrefslogtreecommitdiffstats
path: root/munin-node/PKGBUILD
blob: de756a4b35f062937c7b10e00f61d8c820f6e77c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Contributor: Roberto Alsina <ralsina@kde.org>
pkgname=munin-node
pkgver=1.2.6
pkgrel=12
pkgdesc="A distributed monitoring/graphing agent"
arch=('i686' 'x86_64')
url="http://munin.sf.net"
license=("GPL")
depends=(perl perl-net-server which)
backup=(etc/munin/munin-node.conf)
install=munin-node.install
source=(http://downloads.sourceforge.net/sourceforge/munin/munin_$pkgver.tar.gz \
        Makefile.config munin-node.init munin-node.runit munin-node.finish munin-node.install)

md5sums=('45f84d58f80642ce914f147232f0d396' '686cef93dee285949a0451c81b691085'\
         '14872c731f99d5f9d831115b2f5e282e' '422000b064a03023b8dee2c76eee0548'\
         '39eb25fec876123cff9c6927d4a9d46a' 'aa8e338183ae2f4602bcaedfc6ca8927')

build() {
cd $srcdir/munin-$pkgver
cp $srcdir/Makefile.config $srcdir/munin-$pkgver || exit 1

make PREFIX='' || exit 1
make DESTDIR=$pkgdir install-node install-node-plugins || exit 1

sed -i "s|\$ENV{'MUNIN_HOSTNAME'}.*|\$ENV{'MUNIN_HOSTNAME'} = \`hostname\`;|g" $pkgdir/sbin/munin-node
sed -i "s|\$ENV{'MUNIN_HOSTNAME'}.*|\$ENV{'MUNIN_HOSTNAME'} = \`hostname\`;|g" $pkgdir/sbin/munin-run

install -D -m0755 -o root ../munin-node.init $pkgdir/etc/rc.d/munin-node
install -D -m0755 -o root ../munin-node.runit $pkgdir/etc/munin-node/run
install -D -m0755 -o root ../munin-node.finish $pkgdir/etc/munin-node/finish
}