wok view nagios-plugins/receipt @ rev 22507

Up pkg-config (0.29.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 15:09:22 2020 +0100 (2020-01-01)
parents 269143578a96
children 39e11db3ea78
line source
1 # SliTaz package receipt.
3 PACKAGE="nagios-plugins"
4 VERSION="2.2.1"
5 CATEGORY="network"
6 SHORT_DESC="Plugins for host, service and network monitoring program nagios."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.nagios-plugins.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://www.nagios-plugins.org/download/$TARBALL"
14 DEPENDS="fping libssl"
15 BUILD_DEPENDS="libmysqlclient mysql-dev openldap-dev openssl-dev \
16 radiusclient-ng radiusclient-ng-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure \
22 --prefix=/usr \
23 --libexecdir=/usr/lib/nagios/plugins \
24 --with-nagios-user=nobody \
25 --with-nagios-group=nogroup \
26 --with-ping-command="/bin/ping -w %d -c %d %s" \
27 --with-fping-command="/usr/sbin/fping" \
28 --mandir=/usr/share/man \
29 $CONFIGURE_ARGS
30 make &&
31 make DESTDIR=$DESTDIR install &&
32 make DESTDIR=$DESTDIR install-root
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr/lib
39 mkdir -p $fs/etc/nagios/objects
41 cp -a $install/usr/lib/nagios/ $fs/usr/lib
43 #
44 stuff/convertcfg $src/command.cfg commands > $fs/etc/nagios/objects/command.cfg
46 # Move mySQL plugins in a separate package.
47 rm -f $fs/usr/lib/nagios/plugins/*mysql*
48 }
50 post_install()
51 {
52 if ! grep -q nagios "$1/etc/passwd"; then
53 echo
54 echo -n "Adding user/group nagios..."
55 chroot "$1/" addgroup -S nagios
56 chroot "$1/" adduser -S -D -H -G nagios nagios
57 status
58 fi
60 if [ -f "$1/etc/nagios/resource.cfg" ]; then
61 sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
62 "$1/etc/nagios/resource.cfg"
63 fi
65 # Set permissions for files and directories
66 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
67 chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
68 }