wok view plop/receipt @ rev 24046

memtest,plop: tune lzma compression (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri May 07 14:52:36 2021 +0000 (2021-05-07)
parents c3aef97a3cef
children 3e2a0347b2f1
line source
1 # SliTaz package receipt.
3 PACKAGE="plop"
4 VERSION="5.0.15"
5 CATEGORY="base-system"
6 SHORT_DESC="USB / IDE-CD / PCMCIA CardBus and others boot utility."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="other"
9 WEB_SITE="https://www.plop.at/en/bootmanagers.html"
10 TARBALL="plpbt-$VERSION.zip"
11 WGET_URL="https://download.plop.at/files/bootmngr/$TARBALL"
13 BUILD_DEPENDS="xz"
15 tune_lzma()
16 {
17 cp $stuff/*.S $stuff/pack .
18 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
19 while [ -n "$2" ]; do
20 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
21 shift 2
22 done
23 for i in bootloader unpack ; do
24 cc -o $i.o -Wa,-a=$i.lst -c $i.S
25 objcopy -O binary $i.o $i.bin
26 done
27 ./pack --build bootloader.bin unpack.bin
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 while read ofs data name; do
34 echo -en "\x$data" | \
35 dd conv=notrunc of=plpbt.bin bs=1 seek=$((0x$ofs))
36 done <<EOT
37 0288 00 videoMode=text
38 0295 00 stars=off
39 0299 01 font=bios
40 029A 00 zoomanimation=off
41 EOT
42 tune_lzma 84,mf=bt2 LC 0 PB 0
43 ./pack plpbt.bin plop
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/boot $install/usr/share
50 cp $src/plop $fs/boot/plop.exe
51 cp -a $src/doc $install/usr/share
52 cp -a $src/*.txt $src/*.TXT $install/usr/share/doc
53 }
55 # Pre and post install commands for Tazpkg.
56 post_install()
57 {
58 [ -s $1/boot/isolinux/isolinux.cfg ] &&
59 ! grep -qs '/plop.exe' $1/boot/isolinux/isolinux.cfg &&
60 sed -i 's|i18n.cfg|&\n\
61 LABEL plop usb pcmcia\
62 MENU LABEL USB/PCMCIA boot\
63 KERNEL /boot/plop.exe|' $1/boot/isolinux/isolinux.cfg
64 true
65 }