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