wok-6.x view nagios-nsca/receipt @ rev 24415

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 10 18:04:02 2022 +0000 (2022-02-10)
parents f3fb994aac6d
children 4ebf2fc81c63
line source
1 # SliTaz package receipt.
3 PACKAGE="nagios-nsca"
4 VERSION="2.9.2"
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="nsca"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 #WGET_URL="$SF_MIRROR/nagios/$TARBALL"
14 WGET_URL="http://prdownloads.sourceforge.net/sourceforge/nagios/$TARBALL"
16 BUILD_DEPENDS="libmcrypt-dev perl libwrap-dev"
17 DEPENDS="libmcrypt"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - https://sourceforge.net/projects/nagios/files/ 2>/dev/null | \
23 sed '/scope="row/!d;/nsca-/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
24 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
25 sed '/scope="row/!d;s|.*/nsca-||;s|.tar.*||;q'
26 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 # 2.9.2 unrecognised:
31 # --with-nsca-group=nagios
33 ./configure \
34 --prefix=/usr \
35 --infodir=/usr/share/info \
36 --localstatedir=/var \
37 --datadir=/usr/share/nagios \
38 --sysconfdir=/etc/nagios \
39 --sbindir=/usr/sbin \
40 --bindir=/usr/sbin \
41 --libexecdir=/usr/lib/nagios \
42 --with-nsca-user=nagios \
43 --with-nsca-port=5667 \
44 --mandir=/usr/share/man \
45 $CONFIGURE_ARGS &&
46 make all
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr/sbin
53 mkdir -p $fs/etc/nagios
55 cp -a $src/src/nsca $fs/usr/sbin
56 cp -a $src/src/send_nsca $fs/usr/sbin
58 install -m 0644 $src/sample-config/nsca.cfg $fs/etc/nagios
59 install -m 0644 $src/sample-config/send_nsca.cfg $fs/etc/nagios
60 }