wok annotate etherboot/receipt @ rev 24411

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 09 17:57:59 2022 +0000 (2022-02-09)
parents 10a263b71ff0
children 8ea0030e77cb
rev   line source
pascal@515 1 # SliTaz package receipt.
pascal@515 2
pascal@515 3 PACKAGE="etherboot"
pascal@515 4 VERSION="5.4.3"
pascal@515 5 CATEGORY="system-tools"
pascal@515 6 SHORT_DESC="Ethernet bootloader for PXE and NBI images."
pascal@515 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15588 8 LICENSE="GPL2"
pascal@515 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@515 10 WEB_SITE="http://www.etherboot.org/"
pascal@515 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@515 12
pascal@15588 13 BUILD_DEPENDS="perl"
pascal@15588 14
pascal@24385 15 # What is the latest version available today?
pascal@24385 16 current_version()
pascal@24385 17 {
pascal@24385 18 wget -O - https://sourceforge.net/projects/etherboot/files/etherboot/ 2>/dev/null | \
pascal@24385 19 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24385 20 sed '/scope="row/!d;s|.*/etherboot/||;s|/.*||;q'
pascal@24385 21 }
pascal@24385 22
pascal@515 23 # Rules to configure and make the package.
pascal@515 24 compile_rules()
pascal@515 25 {
pascal@515 26 cd $src/src
pascal@20212 27 sed -i 's|uname -m|echo i486|' Makefile
pascal@1442 28 while read file; do
pascal@1442 29 [ -f done.$file ] && continue
slaxemulator@9700 30 patch -p2 < $stuff/$file
pascal@1442 31 touch done.$file
pascal@1442 32 done <<EOT
pascal@1442 33 etherboot-net.u
pascal@1442 34 etherboot-prefix.u
pascal@1442 35 EOT
pascal@20321 36 make EXTRA_CFLAGS="-Wno-error=unused-but-set-variable" bin/etherboot-net.bzImage
pascal@515 37 }
pascal@515 38
pascal@515 39
pascal@515 40 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@515 41 genpkg_rules()
pascal@515 42 {
pascal@515 43 mkdir -p $fs/usr/share/boot
pascal@541 44 cp $src/src/bin/etherboot-net.bzImage $fs/usr/share/boot/etherboot
pascal@515 45 }
pascal@515 46
pascal@515 47 # Pre and post install commands for Tazpkg.
pascal@515 48 post_install()
pascal@515 49 {
pascal@20210 50 [ -s $1/boot/isolinux/isolinux.cfg ] &&
pascal@20210 51 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
pascal@20210 52 sed -i 's|i18n.cfg|&\n\
pascal@20210 53 LABEL web zeb\
pascal@20210 54 MENU LABEL Web Boot\
pascal@20210 55 KERNEL /boot/etherboot|' $1/boot/isolinux/isolinux.cfg
pascal@20319 56 echo
pascal@20219 57 echo "----"
pascal@20219 58 echo "You can create pxe/nbi boot floppy with:"
pascal@20219 59 echo "# cp /usr/share/boot/etherboot /dev/fd0"
pascal@20219 60 echo "----"
pascal@515 61 }