wok-6.x view ipxe/receipt @ rev 24037
created recipe for xorg-libxshmfence 1.3
author | Hans-G?nter Theisgen |
---|---|
date | Tue Apr 13 06:48:06 2021 +0100 (2021-04-13) |
parents | aa2fff9a1b85 |
children | c1a1d1f23e07 |
line source
1 # SliTaz package receipt.
3 PACKAGE="ipxe"
4 VERSION="1.20.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="Open source network boot firmware."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://ipxe.org/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="https://github.com/ipxe/ipxe/archive/v$VERSION.tar.gz"
13 DEPENDS=""
14 BUILD_DEPENDS="perl wget liblzma-dev syslinux"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src/src
20 patch -p1 < $stuff/cmd_isgt.u
21 sed -i 's|SIZEOF_LOW_4GB / SIZEOF_2MB_PAGE|1 << (SIZEOF_LOW_4GB_LOG2 - SIZEOF_2MB_PAGE_LOG2)|' arch/x86/transitions/librm.S
22 sed -i 's/-llzma/& -lpthread/' Makefile.*
23 sed -i 's|//\(#define.*CONSOLE_FRAMEBUFFER\)|\1|' config/console.h
24 sed -i 's|//\(#define.*CONSOLE_SERIAL\)|\1|' config/console.h
25 sed -e 's|//\(#define.*IMAGE_PNG\)|\1|' \
26 -e 's|.*\(NET_PROTO_IPV6\)|#define \1|' \
27 -e 's|undef \(DOWNLOAD_PROTO_HTTPS\)|define \1|' \
28 -e 's|.*\(VLAN_CMD\)|#define \1|' \
29 -e 's|.*\(CERT_CMD\)|#define \1|' \
30 -e 's|//\(#define.*CONSOLE_CMD\)|\1|' \
31 -e 's|//\(#define.*REBOOT_CMD\)|\1|' -i config/general.h
32 sed -i "s|\(TAG_LINE \"\)|\1${VERSION#*-} -- |" config/branding.h
33 sed -i 's|//\(#define.*CPUID_SETTINGS\)|\1|' config/settings.h
34 pxelinux="$(ls $WOK/syslinux/source/*/core/pxelinux.0)"
35 make bin-i386-efi/snponly.efi EMBED=$stuff/ipxelinux.ipxe,$pxelinux &&
36 mv bin-i386-efi/snponly.efi bin-i386-efi/ipxelinux.efi
37 make bin-i386-efi/ipxe.efi bin-i386-efi/snponly.efi EMBED=$stuff/ipxe.cmd
39 sed -i 's|//\(#define.*MEMMAP_SETTINGS\)|\1|' config/settings.h
40 make bin/undionly.kkkpxe EMBED=$stuff/ipxelinux.ipxe,$pxelinux &&
41 mv bin/undionly.kkkpxe bin/ipxelinux.0
42 make bin/undionly.pxe bin/undionly.kpxe bin/undionly.kkpxe \
43 bin/undionly.kkkpxe bin/ipxe.pxe bin/ipxe.kpxe bin/ipxe.kkpxe \
44 bin/ipxe.kkkpxe bin/ipxe.nbi bin/ipxe.lkrn \
45 bin/ipxe.exe EMBED=$stuff/ipxe.cmd
46 cp $stuff/bootloader.S .
47 cc -o bootloader.o -Wa,-a=bootloader.lst -c bootloader.S
48 objcopy -O binary bootloader.o bootloader.bin
49 size=$(stat -c %s bin/ipxe.lkrn)
50 while read ofs val ; do
51 printf '\\\\x%02X\\\\x%02X' $(($val & 255)) $(($val / 256)) | \
52 xargs echo -en|dd bs=1 conv=notrunc of=bootloader.bin seek=$ofs
53 done 2> /dev/null <<EOT
54 4 $((($size+511)/512))
55 14 $((($size+15)/16))
56 EOT
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/boot $install/usr/share
63 cp -a $src/src/doc $install/usr/share
64 cp -a $src/src/bin/ipxe.lkrn $fs/boot/ipxe.exe
65 dd if=$src/src/bootloader.bin of=$fs/boot/ipxe.exe conv=notrunc
66 }
68 # Pre and post install commands for Tazpkg.
69 post_install()
70 {
71 [ -s $1/boot/isolinux/isolinux.cfg ] &&
72 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
73 sed -i 's|i18n.cfg|&\n\
74 LABEL web zeb\
75 MENU LABEL Web Boot\
76 KERNEL /boot/ipxe.exe|' $1/boot/isolinux/isolinux.cfg
77 true
78 }