wok annotate dummynet64/receipt @ rev 25041

Up fatattr (1.0.1), puzzles (20220128)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri May 27 17:15:46 2022 +0000 (2022-05-27)
parents 364099c9aff2
children a66f312c374b
rev   line source
pascal@20240 1 # SliTaz package receipt.
pascal@20240 2
pascal@20240 3 PACKAGE="dummynet64"
pascal@20267 4 VERSION="20150115"
pascal@20267 5 GITHASH="e717cdd4bef764a4aa7babedc54220b35b04c777"
pascal@20240 6 CATEGORY="network"
pascal@20240 7 SHORT_DESC="Network testing/emulation tool."
pascal@20240 8 MAINTAINER="samuel_trassare@yahoo.com"
pascal@20240 9 LICENSE="BSD"
pascal@21145 10 WEB_SITE="https://web.archive.org/web/20190131145449/http://info.iet.unipi.it/~luigi/dummynet/"
pascal@20267 11 TARBALL="$VERSION-ipfw3.zip"
pascal@20267 12 WGET_URL="https://github.com/luigirizzo/dummynet/archive/$GITHASH.zip"
pascal@20240 13 PROVIDE="dummynet:linux64"
pascal@20240 14
pascal@20240 15 BUILD_DEPENDS="linux64-module-headers uclibc-cross-compiler-x86_64"
pascal@20240 16
pascal@20240 17 # Aufs enable chroot
pascal@20240 18 AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
pascal@20240 19
pascal@24497 20 # What is the latest version available today?
pascal@24497 21 current_version()
pascal@24497 22 {
pascal@24497 23 wget -O - https://github.com/luigirizzo/dummynet/commits/master 2>/dev/null | \
pascal@24497 24 sed '/Commits on/!d;s|.*on |"|;s|<.*|"|;q' | xargs date +%Y%m%d -d
pascal@24497 25 }
pascal@24497 26
pascal@20240 27 # Rules to configure and make the package.
pascal@20240 28 compile_rules()
pascal@20240 29 {
pascal@20240 30 installed=/var/lib/tazpkg/installed
pascal@20240 31 kvers=$(. $installed/linux64-module-headers/receipt ; echo $VERSION)
pascal@20240 32 sed -i "s/WARN := -O1 -Wall -Werror/WARN := -O1 -Wall/" kipfw/Makefile
pascal@20241 33 sed -i "s/uname -r/echo $kvers-slitaz64/" Makefile.inc
pascal@20241 34 sed -i "/par = NULL/d;s|w_q = ((.*|/* & */|;s|double w_q;|/* & */|" \
pascal@20241 35 ipfw/dummynet.c
pascal@20241 36 sed -i "/altqptr =/d" ipfw/ipfw2.c
pascal@20241 37 sed -i "/no-unused-but-set-variable/d" */Makefile
pascal@20240 38 make
pascal@20240 39 }
pascal@20240 40
pascal@20240 41 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@20240 42 genpkg_rules()
pascal@20240 43 {
pascal@20240 44 mkdir -p $fs/usr/bin \
pascal@20240 45 $fs/lib/modules/$kvers-slitaz/kernel/net
pascal@20240 46 cp -a $src/ipfw/ipfw $fs/usr/bin
pascal@20240 47 cp -a $src/kipfw-mod/ipfw_mod.ko $fs/lib/modules/$kvers-slitaz/kernel/net
pascal@20240 48 }
pascal@20240 49
pascal@20240 50 # Post install/remove commands for Tazpkg.
pascal@20240 51 post_install()
pascal@20240 52 {
pascal@20240 53 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
pascal@20240 54 }
pascal@20240 55
pascal@20240 56 post_remove()
pascal@20240 57 {
pascal@20240 58 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
pascal@20240 59 }