SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "muninlite"

# SliTaz package receipt.

PACKAGE="muninlite"
VERSION="1.0.4"
CATEGORY="network"
SHORT_DESC="Simple Munin node."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://$PACKAGE.sourceforge.net/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

BUILD_DEPENDS="perl"

# What is the latest version available today?
current_version()
{
    wget -O - 'https://sourceforge.net/projects/muninlite/files/muninlite - stable/' 2>/dev/null | \
    sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
    sed '/scope="row/!d;s|.*stable/||;s|/.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    cd $src
    make
}

# Rules to gen a SliTaz package suitable for Tazpkg.   
genpkg_rules()                                      
{
    mkdir -p $fs/usr/bin
    cp -a $src/munin-node $fs/usr/bin
}

# Pre and post install commands for Tazpkg.
post_install()
{
    grep -q 4949 "$1/etc/services" ||
    echo "munin        4949/tcp" >> "$1/etc/services"
    grep -q ^munin "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT
munin   stream  tcp     nowait  root    /usr/bin/munin-node
EOT
    echo "/etc/inetd.conf is up to date"
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)