# SliTaz package receipt. PACKAGE="nagios-nsca" VERSION="2.10.1" CATEGORY="network" SHORT_DESC="Service and network monitoring program, remote monitoring." MAINTAINER="erjo@slitaz.org" LICENSE="GPL2" WEB_SITE="https://www.nagios.org/" REPOLOGY="nsca" SOURCE="nsca" TARBALL="$SOURCE-$VERSION.tar.gz" WGET_URL="https://github.com/NagiosEnterprises/$SOURCE/archive/refs/tags/$TARBALL" DEPENDS="libmcrypt" BUILD_DEPENDS="libmcrypt-dev libwrap-dev perl" # What is the latest version available today? current_version() { wget -O - https://sourceforge.net/projects/nagios/files/ 2>/dev/null | \ sed '/scope="row/!d;/nsca-/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ sed '/scope="row/!d;s|.*/nsca-||;s|.tar.*||;q' } # Rules to configure and make the package. compile_rules() { # 2.9.2 unrecognised: # --with-nsca-group=nagios ./configure \ --prefix=/usr \ --infodir=/usr/share/info \ --localstatedir=/var \ --datadir=/usr/share/nagios \ --sysconfdir=/etc/nagios \ --sbindir=/usr/sbin \ --bindir=/usr/sbin \ --libexecdir=/usr/lib/nagios \ --with-nsca-user=nagios \ --with-nsca-port=5667 \ --mandir=/usr/share/man \ $CONFIGURE_ARGS && make all } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/etc/nagios mkdir -p $fs/usr/sbin cp -a $src/src/nsca $fs/usr/sbin cp -a $src/src/send_nsca $fs/usr/sbin install -m 0644 $src/sample-config/nsca.cfg $fs/etc/nagios install -m 0644 $src/sample-config/send_nsca.cfg $fs/etc/nagios }