wok-6.x view nagios-plugins/receipt @ rev 12810
readline: ARM want it :-) so we can cross compile bash
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 20 03:01:49 2012 +0200 (2012-05-20) |
parents | 3d1797940d27 |
children | de514cbbd35e |
line source
1 # SliTaz package receipt.
3 PACKAGE="nagios-plugins"
4 VERSION="1.4.15"
5 CATEGORY="network"
6 SHORT_DESC="Plugins for host, service and network monitoring program."
7 MAINTAINER="erjo@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.nagios.org/"
10 WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL"
11 DEPENDS="libssl fping"
12 BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev
13 mysql-dev libmysqlclient"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr \
20 --libexecdir=/usr/lib/nagios/plugins \
21 --with-nagios-user=nobody \
22 --with-nagios-group=nogroup \
23 --with-ping-command="/bin/ping -w %d -c %d %s" \
24 --with-fping-command="/usr/sbin/fping" \
25 --mandir=/usr/share/man $CONFIGURE_ARGS
27 make &&
28 make DESTDIR=$PWD/_pkg install &&
29 make DESTDIR=$PWD/_pkg install-root
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/lib $fs/etc/nagios/objects
37 cp -a $_pkg/usr/lib/nagios/ $fs/usr/lib
39 #
40 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
42 # Move mySQL plugins in separate package.
43 rm -f $fs/usr/lib/nagios/plugins/*mysql*
45 }
47 post_install()
48 {
49 if ! grep -q nagios $1/etc/passwd; then
50 echo -n "Adding user/group nagios..."
51 chroot $1/ addgroup -S nagios
52 chroot $1/ adduser -S -D -H -G nagios nagios
53 status
54 fi
56 if [ -f $1/etc/nagios/resource.cfg ]; then
57 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
58 $1/etc/nagios/resource.cfg
59 fi
60 # Set perms for files and directories
61 chroot $1/ chown -R nagios.nagios /usr/lib/nagios/plugins
62 chroot $1/ chown -R nagios.nagios /etc/nagios/objects
63 }