wok diff nagios-plugins/receipt @ rev 9742

Fix: claws-mail BUILD_DEPENDS )libassuan, also use xorg-dev for all Xorg dev pkgs) and clean receipt
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 10 02:32:37 2011 +0200 (2011-05-10)
parents
children f1e64641be12
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nagios-plugins/receipt	Tue May 10 02:32:37 2011 +0200
     1.3 @@ -0,0 +1,63 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nagios-plugins"
     1.7 +VERSION="1.4.15"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Plugins for host, service and network monitoring program."
    1.10 +MAINTAINER="erjo@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12 +WEB_SITE="http://www.nagios.org/"
    1.13 +WGET_URL="$SF_MIRROR/nagiosplug/$TARBALL"
    1.14 +DEPENDS="libssl fping"
    1.15 +BUILD_DEPENDS="openssl-dev radiusclient-ng-dev radiusclient-ng openldap-dev
    1.16 + mysql-dev libmysqlclient"
    1.17 +
    1.18 +# Rules to configure and make the package.
    1.19 +compile_rules()
    1.20 +{
    1.21 +	cd $src
    1.22 +	./configure --prefix=/usr \
    1.23 +	--libexecdir=/usr/lib/nagios/plugins \
    1.24 +	--with-nagios-user=nobody \
    1.25 +	--with-nagios-group=nogroup \
    1.26 +	--with-ping-command="/bin/ping -w %d -c %d %s" \
    1.27 +	--with-fping-command="/usr/sbin/fping" \
    1.28 +	~ --mandir=/usr/share/man $CONFIGURE_ARGS
    1.29 +	
    1.30 +	make &&
    1.31 +	make DESTDIR=$PWD/_pkg install &&
    1.32 +	make DESTDIR=$PWD/_pkg install-root
    1.33 +}
    1.34 +
    1.35 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.36 +genpkg_rules()
    1.37 +{
    1.38 +	mkdir -p $fs/usr/lib $fs/etc/nagios/objects
    1.39 +	
    1.40 +	cp -a $_pkg/usr/lib/nagios/ $fs/usr/lib
    1.41 +
    1.42 +	# 
    1.43 +	stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
    1.44 +	
    1.45 +	# Move mySQL plugins in separate package.
    1.46 +	rm -f $fs/usr/lib/nagios/plugins/*mysql*
    1.47 +
    1.48 +}
    1.49 +
    1.50 +post_install()
    1.51 +{
    1.52 +	if ! grep -q nagios $1/etc/passwd; then
    1.53 +		echo -n "Adding user/group nagios..."
    1.54 +		chroot $1/ addgroup -S nagios
    1.55 +		chroot $1/ adduser -S -D -H -G nagios nagios
    1.56 +		status
    1.57 +	fi
    1.58 +	
    1.59 +	if [ -f $1/etc/nagios/resource.cfg ]; then
    1.60 +		sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
    1.61 +		   $1/etc/nagios/resource.cfg
    1.62 +	fi
    1.63 +	# Set perms for files and directories
    1.64 +	chroot $1/ chown -R nagios.nagios /usr/lib/nagios/plugins 
    1.65 +	chroot $1/ chown -R nagios.nagios /etc/nagios/objects
    1.66 +}