wok-6.x annotate 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 |
rev | line source |
---|---|
erjo@8332 | 1 # SliTaz package receipt. |
erjo@8332 | 2 |
erjo@8332 | 3 PACKAGE="nagios-nsca" |
Hans-G?nter@23212 | 4 VERSION="2.9.2" |
erjo@8332 | 5 CATEGORY="network" |
erjo@8332 | 6 SHORT_DESC="Service and network monitoring program, remote monitoring." |
erjo@8332 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15584 | 8 LICENSE="GPL2" |
Hans-G?nter@23212 | 9 WEB_SITE="https://www.nagios.org/" |
Hans-G?nter@23212 | 10 |
erjo@8332 | 11 SOURCE="nsca" |
erjo@8332 | 12 TARBALL="$SOURCE-$VERSION.tar.gz" |
erjo@8332 | 13 #WGET_URL="$SF_MIRROR/nagios/$TARBALL" |
erjo@8332 | 14 WGET_URL="http://prdownloads.sourceforge.net/sourceforge/nagios/$TARBALL" |
pascal@15584 | 15 |
erjo@8332 | 16 BUILD_DEPENDS="libmcrypt-dev perl libwrap-dev" |
erjo@8332 | 17 DEPENDS="libmcrypt" |
erjo@8332 | 18 |
pascal@24402 | 19 # What is the latest version available today? |
pascal@24402 | 20 current_version() |
pascal@24402 | 21 { |
pascal@24402 | 22 wget -O - https://sourceforge.net/projects/nagios/files/ 2>/dev/null | \ |
pascal@24402 | 23 sed '/scope="row/!d;/nsca-/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ |
pascal@24402 | 24 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ |
pascal@24402 | 25 sed '/scope="row/!d;s|.*/nsca-||;s|.tar.*||;q' |
pascal@24402 | 26 } |
erjo@8332 | 27 # Rules to configure and make the package. |
erjo@8332 | 28 compile_rules() |
erjo@8332 | 29 { |
Hans-G?nter@23212 | 30 # 2.9.2 unrecognised: |
Hans-G?nter@23212 | 31 # --with-nsca-group=nagios |
Hans-G?nter@23212 | 32 |
Hans-G?nter@23212 | 33 ./configure \ |
Hans-G?nter@23212 | 34 --prefix=/usr \ |
Hans-G?nter@23212 | 35 --infodir=/usr/share/info \ |
Hans-G?nter@23212 | 36 --localstatedir=/var \ |
Hans-G?nter@23212 | 37 --datadir=/usr/share/nagios \ |
Hans-G?nter@23212 | 38 --sysconfdir=/etc/nagios \ |
Hans-G?nter@23212 | 39 --sbindir=/usr/sbin \ |
Hans-G?nter@23212 | 40 --bindir=/usr/sbin \ |
Hans-G?nter@23212 | 41 --libexecdir=/usr/lib/nagios \ |
Hans-G?nter@23212 | 42 --with-nsca-user=nagios \ |
Hans-G?nter@23212 | 43 --with-nsca-port=5667 \ |
Hans-G?nter@23212 | 44 --mandir=/usr/share/man \ |
Hans-G?nter@23212 | 45 $CONFIGURE_ARGS && |
erjo@8332 | 46 make all |
erjo@8332 | 47 } |
erjo@8332 | 48 |
erjo@8332 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@8332 | 50 genpkg_rules() |
erjo@8332 | 51 { |
Hans-G?nter@23212 | 52 mkdir -p $fs/usr/sbin |
Hans-G?nter@23212 | 53 mkdir -p $fs/etc/nagios |
Hans-G?nter@23212 | 54 |
Hans-G?nter@23212 | 55 cp -a $src/src/nsca $fs/usr/sbin |
Hans-G?nter@23212 | 56 cp -a $src/src/send_nsca $fs/usr/sbin |
erjo@8332 | 57 |
Hans-G?nter@23212 | 58 install -m 0644 $src/sample-config/nsca.cfg $fs/etc/nagios |
erjo@8332 | 59 install -m 0644 $src/sample-config/send_nsca.cfg $fs/etc/nagios |
erjo@8332 | 60 } |