wok view nagios-nrpe/receipt @ rev 22418

libxfce4util: build fails for 4.14, using last release 4.12: error: expected ')' before 'GObject'
author Erkan Yilmaz <erkan@slitaz.org>
date Sun Dec 15 08:33:18 2019 +0000 (2019-12-15)
parents a78610b2eb47
children 02aa9958ad62
line source
1 # SliTaz package receipt.
3 PACKAGE="nagios-nrpe"
4 VERSION="3.2.1"
5 CATEGORY="network"
6 SHORT_DESC="Service and network monitoring program, remote monitoring."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.nagios.org/"
11 SOURCE="nrpe"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="$SF_MIRROR/nagios/$TARBALL"
15 BUILD_DEPENDS="libcrypto-dev libwrap-dev openssl openssl-dev"
16 DEPENDS="libcrypto libssl nagios-plugins"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 while read patch_file
22 do
23 if [ ! -f done.$patch_file ]; then
24 patch -p1 < $stuff/$patch_file || return 1
25 touch done.$patch_file
26 fi
27 done <<EOT
28 $PACKAGE-$VERSION-Makefile.u
29 EOT
31 ./configure \
32 --prefix=/usr \
33 --infodir=/usr/share/info \
34 --localstatedir=/var \
35 --datadir=/usr/share/nagios \
36 --sysconfdir=/etc/nagios \
37 --sbindir=/usr/lib/nagios \
38 --bindir=/usr/bin \
39 --libexecdir=/usr/lib/nagios/plugins \
40 --enable-ssl \
41 --with-nagios-user=nagios \
42 --with-nagios-group=nagios \
43 --with-nrpe-user=nagios \
44 --with-nrpe-group=nagios \
45 --mandir=/usr/share/man \
46 $CONFIGURE_ARGS &&
47 make all &&
48 make install
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/etc/nagios/objects
55 mkdir -p $fs/etc/init.d
57 cp -a $install/usr $fs
58 install -m 0644 $src/sample-config/nrpe.cfg $fs/etc/nagios
60 sed -i 's|/var/run|/var/run/nagios|' $fs/etc/nagios/nrpe.cfg
62 # Install configuration file and init script
63 install -o root -g root -m 644 $stuff/nrpe.cfg $fs/etc/nagios/objects
64 install -o root -g root -m 755 $stuff/nrpe $fs/etc/init.d
65 }
67 post_install()
68 {
69 if ! grep -q nagios "$1/etc/passwd"; then
70 echo
71 echo -n "Adding user nagios..."
72 chroot "$1/" adduser -S -D -H nagios
73 status
74 fi
76 # Set permissions for files and directories
77 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
78 chroot "$1/" chown nagios.nagios /etc/nagios/*
80 # Add check_nrpe in nagios configuration file
81 echo "cfg_file=/etc/nagios/objects/nrpe.cfg" >> "$1/etc/nagios/nagios.cfg"
82 }
84 post_remove()
85 {
86 [ -f "$1/etc/nagios/nagios.cfg" ] && sed -i 's/.*nrpe.cfg//' "$1/etc/nagios/nagios.cfg"
87 }