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