wok annotate net-tools/receipt @ rev 24981

Up pce (20220220-991c55d9)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 08 10:57:53 2022 +0000 (2022-05-08)
parents 535c806240cc
children ad0bc3efbf37
rev   line source
pascal@11215 1 # SliTaz package receipt.
pascal@11215 2
pascal@11215 3 PACKAGE="net-tools"
Hans-G?nter@24964 4 VERSION="2.10"
pascal@11215 5 CATEGORY="network"
pascal@11215 6 SHORT_DESC="Network toolbox."
pascal@11215 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15584 8 LICENSE="GPL2"
Hans-G?nter@24964 9 WEB_SITE="https://sourceforge.net/projects/net-tools/"
Hans-G?nter@24964 10
Hans-G?nter@24964 11 TARBALL="$PACKAGE-$VERSION.tar.xz"
Hans-G?nter@24964 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
Hans-G?nter@24964 13
Hans-G?nter@24964 14 SUGGESTED="net-tools-lang"
pascal@11215 15
pascal@24465 16 # What is the latest version available today?
pascal@24465 17 current_version()
pascal@24465 18 {
pascal@24465 19 wget -O - https://sourceforge.net/projects/net-tools/files/ 2>/dev/null | \
pascal@24465 20 sed '/scope="row/!d;/net-tools-/!d;s|.*/net-tools-||;s|.tar.*||;q'
pascal@24465 21 }
pascal@24465 22
pascal@11215 23 # Rules to configure and make the package.
pascal@11215 24 compile_rules()
pascal@11215 25 {
pascal@15584 26 mkdir $DESTDIR
Hans-G?nter@24964 27
Hans-G?nter@24964 28 enabled="HAVE_AFINET HAVE_AFUNIX HAVE_ARP_TOOLS HAVE_FW_MASQUERADE \
Hans-G?nter@24964 29 HAVE_HOSTNAME_SYMLINKS HAVE_HOSTNAME_TOOLS HAVE_HWETHER HAVE_HWPPP \
Hans-G?nter@24964 30 HAVE_HWTUNNEL HAVE_I18N HAVE_IP_TOOLS HAVE_MII HAVE_PLIP_TOOLS HAVE_SERIAL_TOOLS"
Hans-G?nter@24964 31
Hans-G?nter@24964 32 sed '/HAVE_/!d;s/.*\(HAVE.*\)../\1/' < config.in | while read name
Hans-G?nter@24964 33 do
pascal@11215 34 val=0
pascal@11215 35 case " $enabled " in
Hans-G?nter@24964 36 (*\ $name\ *) val=1 ;;
pascal@11215 37 esac
pascal@11215 38 echo "#define $name $val"
pascal@11215 39 echo "$name=$val" 1>&2
Hans-G?nter@24964 40 done > config.h 2> config.make
Hans-G?nter@24964 41
Hans-G?nter@24964 42 # create localised message files and man pages
Hans-G?nter@24964 43 echo "I18N=1" >> config.make
Hans-G?nter@24964 44
pascal@11215 45 sed -i 's/default:/&;/' hostname.c lib/inet_sr.c
Hans-G?nter@24964 46 # 2.10 not required
Hans-G?nter@24964 47 # sed -i '/"usage/,/10baseT/s/.*/&\\n\\/' mii-tool.c
Hans-G?nter@24964 48
Hans-G?nter@24964 49 make &&
Hans-G?nter@24964 50 make install BASEDIR=$DESTDIR
pascal@11215 51 }
pascal@11215 52
pascal@11215 53 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@11215 54 genpkg_rules()
pascal@11215 55 {
Hans-G?nter@24964 56 cook_copy_folders bin
Hans-G?nter@24964 57 cook_copy_folders sbin
pascal@11215 58 }
Hans-G?nter@24964 59
Hans-G?nter@24964 60 # Remove busybox symbolic links after installing
Hans-G?nter@24964 61 # because these files are now in /bin
Hans-G?nter@24964 62 post_install()
Hans-G?nter@24964 63 {
Hans-G?nter@24964 64 rm -f "$1/sbin/ifconfig"
Hans-G?nter@24964 65 rm -f "$1/sbin/route"
Hans-G?nter@24964 66 }