wok annotate ipxe/receipt @ rev 20700

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