wok view ipxe/receipt @ rev 20713

updated at (3.1.13 -> 3.1.23)
author Hans-G?nter Theisgen
date Wed Feb 06 17:06:52 2019 +0100 (2019-02-06)
parents beda06c66d60
children f9ea4a4c7b87
line source
1 # SliTaz package receipt.
3 PACKAGE="ipxe"
4 VERSION="1.0.0-20170417"
5 GIT_TAG="2d79b20f2a3eba199012de3bd11f8aef0a5b9dbf"
6 CATEGORY="system-tools"
7 SHORT_DESC="Open source network boot firmware."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="http://ipxe.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="https://git.ipxe.org/ipxe.git/snapshot/$GIT_TAG.tar.bz2"
14 DEPENDS=""
15 BUILD_DEPENDS="perl wget liblzma-dev syslinux"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src/src
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 -i -e 's|//\(#define.*IMAGE_PNG\)|\1|' \
26 -e 's|//\(#define.*CONSOLE_CMD\)|\1|' \
27 -e 's|//\(#define.*REBOOT_CMD\)|\1|' config/general.h
28 sed -i 's|//\(#define.*CPUID_SETTINGS\)|\1|' config/settings.h
29 pxelinux="$(ls $WOK/syslinux/source/*/core/pxelinux.0)"
30 make bin/undionly.kkkpxe EMBED=$stuff/ipxelinux.ipxe,$pxelinux &&
31 mv bin/undionly.kkkpxe bin/ipxelinux.0
32 make bin-i386-efi/snponly.efi EMBED=$stuff/ipxelinux.ipxe,$pxelinux &&
33 mv bin-i386-efi/snponly.efi bin-i386-efi/ipxelinux.efi
34 make bin/undionly.pxe bin/undionly.kpxe bin/undionly.kkpxe \
35 bin/undionly.kkkpxe bin/ipxe.pxe bin/ipxe.kpxe bin/ipxe.kkpxe \
36 bin/ipxe.kkkpxe bin/ipxe.nbi bin/ipxe.lkrn bin-i386-efi/ipxe.efi \
37 bin-i386-efi/snponly.efi bin/ipxe.exe EMBED=$stuff/ipxe.cmd
38 cp $stuff/bootloader.S .
39 cc -o bootloader.o -Wa,-a=bootloader.lst -c bootloader.S
40 objcopy -O binary bootloader.o bootloader.bin
41 size=$(stat -c %s bin/ipxe.lkrn)
42 while read ofs val ; do
43 printf '\\\\x%02X\\\\x%02X' $(($val & 255)) $(($val / 256)) | \
44 xargs echo -en|dd bs=1 conv=notrunc of=bootloader.bin seek=$ofs
45 done 2> /dev/null <<EOT
46 4 $((($size+511)/512))
47 14 $((($size+15)/16))
48 EOT
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/boot $install/usr/share
55 cp -a $src/src/doc $install/usr/share
56 cp -a $src/src/bin/ipxe.lkrn $fs/boot/ipxe.exe
57 dd if=$src/src/bootloader.bin of=$fs/boot/ipxe.exe conv=notrunc
58 }
60 # Pre and post install commands for Tazpkg.
61 post_install()
62 {
63 [ -s $1/boot/isolinux/isolinux.cfg ] &&
64 ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
65 sed -i 's|i18n.cfg|&\n\
66 LABEL web zeb\
67 MENU LABEL Web Boot\
68 KERNEL /boot/ipxe.exe|' $1/boot/isolinux/isolinux.cfg
69 true
70 }