wok view BootProg/receipt @ rev 25569

BootProg: fix boot16.asm
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri May 12 21:35:09 2023 +0000 (12 months ago)
parents 3c71bb4367c3
children
line source
1 # SliTaz package receipt.
3 PACKAGE="BootProg"
4 VERSION="slitaz"
5 CATEGORY="base-system"
6 SHORT_DESC="FAT12/16/32 Bootsector for .COMs/.EXEs"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 WEB_SITE="https://wiki.osdev.org/BootProg"
11 BUILD_DEPENDS="nasm xz"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 mkdir -p $src && cd $src
17 bs="boot12 boot16 bootex boot32"
18 cp $stuff/boot??.asm .
19 cp boot16.asm boot12.asm
20 sed -i 's|^FAT12.*|FAT12 equ 0|' boot16.asm
21 sed -i 's|^FAT16.*|FAT16 equ 0|' boot12.asm
22 for i in $bs ; do
23 nasm $i.asm -f bin -o $i.bin -l $i.lst || return 1
24 done
25 sed '1,2!d' $stuff/bootprog.sh > bootprog
26 {
27 sed "1,2d;s|FAT32SZ|$(stat -c %s boot32.bin)|" $stuff/bootprog.sh
28 cat ${bs// /.bin }.bin
29 } | xz -z --format=lzma --lzma1=lc=0,pb=0,nice=33,dict=4k >> bootprog
30 chmod +x bootprog
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/bin
37 cp -a $src/bootprog $fs/usr/bin
38 }