wok view plop/receipt @ rev 25086
created recipe for sylpheed-lang
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jun 17 06:42:13 2022 +0100 (2022-06-17) |
parents | 3e2a0347b2f1 |
children | 7f7bd3c9775e |
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 current_version()
16 {
17 wget -O - $WEB_SITE 2>/dev/null | \
18 sed '/td align=center/!d;s|.*center>||;s|</.*||;q'
19 }
21 tune_lzma()
22 {
23 cp $stuff/*.S $stuff/pack .
24 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
25 while [ -n "$2" ]; do
26 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
27 shift 2
28 done
29 for i in bootloader unpack ; do
30 cc -o $i.o -Wa,-a=$i.lst -c $i.S
31 objcopy --only-section=.text -O binary $i.o $i.bin
32 done
33 ./pack --build bootloader.bin unpack.bin
34 }
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 while read ofs data name; do
40 echo -en "\x$data" | \
41 dd conv=notrunc of=plpbt.bin bs=1 seek=$((0x$ofs))
42 done <<EOT
43 0288 00 videoMode=text
44 0295 00 stars=off
45 0299 01 font=bios
46 029A 00 zoomanimation=off
47 EOT
48 tune_lzma 84,mf=bt2 LC 0 PB 0
49 ./pack plpbt.bin plop
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/boot $install/usr/share
56 cp $src/plop $fs/boot/plop.exe
57 cp -a $src/doc $install/usr/share
58 cp -a $src/*.txt $src/*.TXT $install/usr/share/doc
59 }
61 # Pre and post install commands for Tazpkg.
62 post_install()
63 {
64 [ -s $1/boot/isolinux/isolinux.cfg ] &&
65 ! grep -qs '/plop.exe' $1/boot/isolinux/isolinux.cfg &&
66 sed -i 's|i18n.cfg|&\n\
67 LABEL plop usb pcmcia\
68 MENU LABEL USB/PCMCIA boot\
69 KERNEL /boot/plop.exe|' $1/boot/isolinux/isolinux.cfg
70 true
71 }