wok view iptraf/receipt @ rev 24506
Update some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 20 14:41:23 2022 +0000 (2022-02-20) |
parents | 27f3dea23598 |
children | bc2b9d9bed6f |
line source
1 # SliTaz package receipt.
3 PACKAGE="iptraf"
4 VERSION="3.0.0"
5 CATEGORY="network"
6 SHORT_DESC="IP Network Monitoring Software."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://$PACKAGE.seul.org/"
11 WGET_URL="ftp://$PACKAGE.seul.org/pub/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/var/iptraf/iptraf.cfg"
14 DEPENDS="ncurses"
15 BUILD_DEPENDS="ncurses-dev"
17 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - http://iptraf.seul.org/download.html 2>/dev/null | \
21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src/src
28 sed -i 's|linux/if_tr|netinet/if_tr|' tcptable.h *.c
29 sed -i 's|uname -m|echo i486|' Makefile
30 sed -i 's/lncurses/& -ltinfo/' Makefile
31 mkdir -p $DESTDIR/usr/bin 2> /dev/null
32 sed -i 's/ARPHRD_PPP:$/& case ARPHRD_NONE:/' packet.c
33 sed -i 's|/local/|/|' Makefile
34 make clean &&
35 make &&
36 cp rvnamed rawtime iptraf $DESTDIR/usr/bin
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/var/iptraf $fs/var/log/iptraf
43 cp -a $install/* $fs
44 }
46 post_install()
47 {
48 mkdir -p "$1/var/run/iptraf"
49 }
51 post_remove()
52 {
53 rm -r "$1/var/run/iptraf"
54 }