wok-next view nagios-plugins/receipt @ rev 19418
cdrkit: add efi boot support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Sep 29 13:47:18 2016 +0200 (2016-09-29) |
parents | dead8955c3ca |
children | 99d1d45ec006 |
line source
1 # SliTaz package receipt.
3 PACKAGE="nagios-plugins"
4 VERSION="1.4.16"
5 CATEGORY="network"
6 SHORT_DESC="Plugins for host, service and network monitoring program."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL3"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.nagios.org/"
11 WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL"
13 DEPENDS="libssl fping"
14 BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev
15 mysql-dev libmysqlclient"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure --prefix=/usr \
22 --libexecdir=/usr/lib/nagios/plugins \
23 --with-nagios-user=nobody \
24 --with-nagios-group=nogroup \
25 --with-ping-command="/bin/ping -w %d -c %d %s" \
26 --with-fping-command="/usr/sbin/fping" \
27 --mandir=/usr/share/man $CONFIGURE_ARGS
29 make &&
30 make DESTDIR=$DESTDIR install &&
31 make DESTDIR=$DESTDIR install-root
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/lib $fs/etc/nagios/objects
39 cp -a $install/usr/lib/nagios/ $fs/usr/lib
41 #
42 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
44 # Move mySQL plugins in separate package.
45 rm -f $fs/usr/lib/nagios/plugins/*mysql*
47 }
49 post_install()
50 {
51 if ! grep -q nagios "$1/etc/passwd"; then
52 echo -n "Adding user/group nagios..."
53 chroot "$1/" addgroup -S nagios
54 chroot "$1/" adduser -S -D -H -G nagios nagios
55 status
56 fi
58 if [ -f "$1/etc/nagios/resource.cfg" ]; then
59 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
60 "$1/etc/nagios/resource.cfg"
61 fi
62 # Set perms for files and directories
63 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
64 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
65 }