wok-current annotate grub2-efi/receipt @ rev 25733
Accept licence PyQt-x11-gpl, bump firmware* to 20240610, build imagemagick (merge)
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Dec 20 16:13:23 2024 +0000 (6 days ago) |
parents | 72f2704d3ae0 |
children |
rev | line source |
---|---|
pascal@18162 | 1 # SliTaz package receipt. |
pascal@18162 | 2 |
pascal@18162 | 3 PACKAGE="grub2-efi" |
Hans-G?nter@22404 | 4 VERSION="2.04" |
pascal@18162 | 5 CATEGORY="base-system" |
pascal@18162 | 6 SHORT_DESC="GRUB2 boot loader." |
pascal@18162 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@18162 | 8 LICENSE="GPL3" |
Hans-G?nter@22404 | 9 WEB_SITE="https://www.gnu.org/software/grub/" |
Hans-G?nter@22404 | 10 |
Hans-G?nter@22404 | 11 SOURCE="grub" |
pascal@18162 | 12 TARBALL="$SOURCE-$VERSION.tar.xz" |
pascal@24415 | 13 WGET_URL="http://ftp.gnu.org/gnu/grub/$TARBALL" |
pascal@18162 | 14 |
Hans-G?nter@22404 | 15 DEPENDS="freetype grep libdevmapper libusb-compat libusb ncurses zlib" |
shann@25728 | 16 BUILD_DEPENDS="automake bison flex freetype-dev fuse2-dev libdevmapper-dev |
Hans-G?nter@22404 | 17 libusb-compat-dev libusb-dev ncurses-dev xz-dev zlib-dev" |
pascal@18162 | 18 |
pascal@24066 | 19 CONFIG_FILES="/etc/default/grub /etc/grub.d/40_custom" |
pascal@24066 | 20 |
shann@25728 | 21 HOST_ARCH="i486 x86_64" |
shann@25728 | 22 |
pascal@24415 | 23 # What is the latest version available today? |
pascal@24415 | 24 current_version() |
pascal@24415 | 25 { |
pascal@24415 | 26 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24415 | 27 sed "/$SOURCE-/!d;/tar/!d;s|.*$SOURCE-||;s|.tar.*||" | sort -Vr | sed q |
pascal@24415 | 28 } |
pascal@24415 | 29 |
pascal@18162 | 30 # Rules to configure and make the package. |
pascal@18162 | 31 compile_rules() |
pascal@18162 | 32 { |
Hans-G?nter@22404 | 33 sed -i 's|fprintf(...) |&(void)|' \ |
Hans-G?nter@22404 | 34 grub-core/script/yylex.l |
pascal@18162 | 35 export EFI_ARCH=i386 |
Hans-G?nter@22404 | 36 |
shann@25728 | 37 sed -i 's|fprintf(...) |&(void)|' grub-core/script/yylex.l |
shann@25728 | 38 |
shann@25728 | 39 # Avoid grub-mkimage error: decompressor is too big: |
shann@25728 | 40 patch --strip=1 --input=$WOK/grub2/stuff/patches/gentpl.py-2.04 |
shann@25728 | 41 # see also: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce |
shann@25728 | 42 |
shann@25728 | 43 case $SLITAZ_ARCH in |
shann@25728 | 44 x86_64) |
shann@25728 | 45 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' util/getroot.c grub-core/kern/emu/hostdisk.c |
shann@25728 | 46 |
shann@25728 | 47 # CVE-2015-8370 |
shann@25728 | 48 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c grub-core/normal/auth.c |
shann@25728 | 49 |
shann@25728 | 50 # Fixes for flex 2.5.37 |
shann@25728 | 51 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value" |
shann@25728 | 52 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' grub-core/script/yylex.l |
shann@25728 | 53 |
shann@25728 | 54 sed -i 's/is_symbol_local /type == 2 || /' util/grub-module-verifier*.c* |
shann@25728 | 55 sed -i 's/.*unsupported relocation.*/continue;/' util/grub-module-verifier*.c* |
shann@25728 | 56 sed -i 's|.*add fixup entry for R_X86_64_32|// &|' util/grub-mkimage*.c* ;; |
shann@25728 | 57 esac |
shann@25728 | 58 |
shann@25728 | 59 ./autogen.sh && |
Hans-G?nter@22404 | 60 ./configure \ |
Hans-G?nter@22404 | 61 --prefix=/usr \ |
Hans-G?nter@22404 | 62 --sysconfdir=/etc \ |
Hans-G?nter@22404 | 63 --with-platform=efi \ |
Hans-G?nter@22404 | 64 --target=${EFI_ARCH} \ |
Hans-G?nter@22404 | 65 --program-prefix="" \ |
Hans-G?nter@22404 | 66 --mandir=/usr/share/man \ |
Hans-G?nter@22404 | 67 $CONFIGURE_ARGS && |
pascal@18162 | 68 make $MAKEFLAGS |
Hans-G?nter@22404 | 69 |
shann@25728 | 70 # On x86_64 we want full grub |
shann@25728 | 71 case $SLITAZ_ARCH in |
shann@25728 | 72 x86_64) |
shann@25728 | 73 make install DESTDIR=$DESTDIR ;; |
shann@25728 | 74 esac |
shann@25728 | 75 |
pascal@18162 | 76 cd grub-core |
pascal@18162 | 77 ../grub-mkimage -d . -o ../bootia32.efi -O i386-efi -p /boot/grub \ |
Hans-G?nter@22404 | 78 all_video appleldr boot btrfs cat chain configfile echo \ |
Hans-G?nter@22404 | 79 efi_gop efi_uga elf ext2 extcmd fat gettext gfxterm gzio hfs \ |
Hans-G?nter@22404 | 80 hfsplus iso9660 keylayouts linux loadbios loadenv loopback \ |
Hans-G?nter@22404 | 81 ls lsacpi lsefimmap lsefisystab lssal lvm memdisk memrw \ |
Hans-G?nter@22404 | 82 minicmd minix minix2 mmap msdospart normal ntfs part_apple \ |
Hans-G?nter@22404 | 83 part_bsd part_gpt reiserfs scsi search search_fs_file \ |
Hans-G?nter@22404 | 84 xfs xnu |
pascal@18162 | 85 } |
pascal@18162 | 86 |
pascal@18162 | 87 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@18162 | 88 genpkg_rules() |
pascal@18162 | 89 { |
shann@25728 | 90 case $SLITAZ_ARCH in |
shann@25728 | 91 i?86) |
shann@25728 | 92 mkdir -p $fs/boot/efi/boot |
shann@25728 | 93 cp $src/bootia32.efi $fs/boot/efi/boot ;; |
shann@25728 | 94 x86_64) |
shann@25728 | 95 mkdir -p $fs/boot/grub $fs/etc/default $fs/usr |
shann@25728 | 96 cp -a $install/usr/bin $fs/usr |
shann@25728 | 97 cp -a $install/usr/sbin $fs/usr |
shann@25728 | 98 cp -a $install/usr/share $fs/usr |
shann@25728 | 99 cp -a $install/usr/lib $fs/usr |
shann@25728 | 100 cp -a $install/etc $fs |
shann@25728 | 101 |
shann@25728 | 102 cp -a $WOK/grub2/stuff/etc-default-grub \ |
shann@25728 | 103 $fs/etc/default/grub |
shann@25728 | 104 |
shann@25728 | 105 # Example configuration file (grub.cfg). |
shann@25728 | 106 cp -a $WOK/grub2/stuff/example-grub.cfg \ |
shann@25728 | 107 $fs/boot/grub ;; |
shann@25728 | 108 esac |
pascal@18162 | 109 } |