wok-tiny annotate plop/receipt @ rev 173

Fix ctorrent-dnh & tfttest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 14 09:04:04 2021 +0000 (2021-07-14)
parents aacd5b54d010
children bbb34fe4904d
rev   line source
pascal@152 1 # SliTaz package receipt.
pascal@152 2
pascal@152 3 PACKAGE="plop"
pascal@152 4 VERSION="5.0.15"
pascal@152 5 CATEGORY="base-system"
pascal@169 6 SHORT_DESC="USB / IDE-CD / PCMCIA CardBus and others boot utility (486+)."
pascal@152 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@152 8 LICENSE="other"
pascal@152 9 WEB_SITE="https://www.plop.at/en/bootmanagers.html"
pascal@165 10 TARBALL="plpbt-$VERSION.zip"
pascal@152 11 WGET_URL="https://download.plop.at/files/bootmngr/$TARBALL"
pascal@152 12 TARGET="i486"
pascal@152 13
pascal@166 14 BUILD_DEPENDS="xz wget"
pascal@152 15
pascal@173 16 tune_lzma()
pascal@173 17 {
pascal@173 18 cp $stuff/*.S $stuff/pack .
pascal@173 19 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
pascal@173 20 while [ -n "$2" ]; do
pascal@173 21 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
pascal@173 22 shift 2
pascal@173 23 done
pascal@173 24 for i in bootloader unpack ; do
pascal@173 25 cc -o $i.o -Wa,-a=$i.lst -c $i.S
pascal@173 26 objcopy -O binary $i.o $i.bin
pascal@173 27 done
pascal@173 28 ./pack --build bootloader.bin unpack.bin
pascal@173 29 }
pascal@173 30
pascal@152 31 # Rules to configure and make the package.
pascal@152 32 compile_rules()
pascal@152 33 {
pascal@153 34 while read ofs data name; do
pascal@153 35 echo -en "\x$data" | \
pascal@153 36 dd conv=notrunc of=plpbt.bin bs=1 seek=$((0x$ofs))
pascal@153 37 done <<EOT
pascal@153 38 0288 00 videoMode=text
pascal@153 39 0295 00 stars=off
pascal@153 40 0299 01 font=bios
pascal@153 41 029A 00 zoomanimation=off
pascal@153 42 EOT
pascal@173 43 tune_lzma 84,mf=bt2 PB 0 LC 0
pascal@152 44 ./pack plpbt.bin plop
pascal@152 45 }
pascal@152 46
pascal@152 47 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@152 48 genpkg_rules()
pascal@152 49 {
pascal@152 50 mkdir -p $fs/boot
pascal@152 51 cp $src/plop $fs/boot/
pascal@152 52 }
pascal@153 53
pascal@153 54 # Post install/remove commands for Tazpkg.
pascal@153 55 post_install()
pascal@153 56 {
pascal@153 57 grep -qs ^plop $1/boot/bootmenu ||
pascal@154 58 echo "plop Plop,boot Boot manager (may run under DOS, in real mode or with emm386, if renamed to plop.exe)" >> $1/boot/bootmenu
pascal@153 59 }