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