SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "trafshow"

# SliTaz package receipt.

PACKAGE="trafshow"
VERSION="5.2.3"
CATEGORY="network"
SHORT_DESC="Full screen network traffic monitor."
MAINTAINER="paul@slitaz.org"
LICENSE="BSD"
TARBALL="$PACKAGE-$VERSION.tgz"
WEB_SITE="https://web.archive.org/web/20130707021442/soft.risp.ru/trafshow/index_en.shtml"
WGET_URL="https://fossies.org/linux/misc/old/$TARBALL"

DEPENDS="ncurses libpcap"
BUILD_DEPENDS="ncurses-dev libpcap-dev"

# What is the latest version available today?
current_version()
{
    wget -O - https://fossies.org/linux/misc/old/ 2>/dev/null | \
    sed '/trafshow-/!d;s|.*trafshow-||;s|.t.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    export LDFLAGS="$LDFLAGS -ltinfo"

    # fix session.c bug
    sed -i '43d' session.c

    # libpcap 1.10 has its own pcap_init
    sed -i 's|pcap_init|&2|' trafshow.c

    ./configure \
        --prefix=/usr \
        $CONFIGURE_ARGS && make 
}

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

    # tidy config file and change perms
    chown root:root $fs/etc/trafshow
    sed -i 's|*/icmp|#*/icmp|' $fs/etc/trafshow
    sed -i 's|nfs|#nfs|' $fs/etc/trafshow
    sed -i 's|513|#513|' $fs/etc/trafshow
    sed -i 's|514|#514|' $fs/etc/trafshow
}
5935 packages and 845883 files in cooking database (Sun Jun 30 00:45:24 2024)