wok-next annotate grub2/receipt @ rev 21196
updated scrollz again (2.2.3 -> 2.3)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Oct 03 16:09:40 2019 +0100 (2019-10-03) |
parents | d5aab818505e |
children | 8016a8b90a2d |
rev | line source |
---|---|
pascal@20355 | 1 # SliTaz package receipt v2. |
pascal@4478 | 2 |
pascal@4478 | 3 PACKAGE="grub2" |
pascal@20355 | 4 VERSION="2.02" |
pascal@4478 | 5 CATEGORY="base-system" |
pascal@20355 | 6 SHORT_DESC="GRUB2 boot loader" |
pascal@4478 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14999 | 8 LICENSE="GPL3" |
pascal@14999 | 9 WEB_SITE="http://www.gnu.org/software/grub/" |
al@20436 | 10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/grub.html" |
al@20882 | 11 REPOLOGY="grub" |
al@20436 | 12 |
al@20436 | 13 TARBALL="grub-$VERSION.tar.xz" |
pascal@14999 | 14 WGET_URL="ftp://ftp.gnu.org/gnu/grub/$TARBALL" |
pascal@14999 | 15 |
pascal@13115 | 16 BUILD_DEPENDS="flex bison zlib-dev xz-dev freetype-dev ncurses-dev \ |
pascal@13115 | 17 libusb-compat-dev libusb-dev libdevmapper-dev" |
al@21020 | 18 SPLIT="$PACKAGE-efi:efi $PACKAGE-efi-modules:efi" |
pascal@4478 | 19 |
al@20436 | 20 compile_rules() { |
pascal@20355 | 21 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \ |
pascal@20356 | 22 util/getroot.c grub-core/kern/emu/hostdisk.c |
pascal@20355 | 23 |
pascal@18709 | 24 # CVE-2015-8370 |
pascal@18710 | 25 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c grub-core/normal/auth.c |
pascal@18709 | 26 |
pascal@13386 | 27 # Fixes for flex 2.5.37 |
al@20436 | 28 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value" |
pascal@20355 | 29 sed -i '/#undef gets/{N;s/.*/#ifdef gets\n&\n#endif/}' grub-core/gnulib/stdio*h |
pascal@13386 | 30 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' grub-core/script/yylex.l |
pascal@20355 | 31 |
al@20436 | 32 case $SET in |
al@20436 | 33 '') |
al@20436 | 34 #chmod +x install-sh |
al@21064 | 35 ./configure \ |
al@21064 | 36 --disable-werror \ |
al@21064 | 37 $CONFIGURE_ARGS && |
al@20436 | 38 make $MAKEFLAGS && |
al@21020 | 39 make DESTDIR=$install install || return 1 |
pascal@4478 | 40 |
al@20436 | 41 # Example config file (grub.cfg) |
al@20436 | 42 install -Dm0644 $stuff/example-grub.cfg $install/boot/grub/example-grub.cfg |
al@20436 | 43 ;; |
al@20436 | 44 efi) |
pascal@20642 | 45 case $ARCH in |
al@21064 | 46 i?86) |
al@21064 | 47 bootimg=bootia32.efi |
al@21064 | 48 EFI_ARCH=i386;; |
al@21064 | 49 x86_64) |
al@21064 | 50 bootimg=bootx64.efi |
al@21064 | 51 EFI_ARCH=x86_64;; |
pascal@20642 | 52 esac |
pascal@20642 | 53 export EFI_ARCH |
al@20436 | 54 ./configure \ |
al@20436 | 55 --with-platform=efi \ |
al@20436 | 56 --target=$EFI_ARCH \ |
al@20436 | 57 --program-prefix="" \ |
al@20436 | 58 $CONFIGURE_ARGS && |
al@20436 | 59 make clean && |
al@20436 | 60 make $MAKEFLAGS || return 1 |
al@20436 | 61 |
al@20436 | 62 cd grub-core |
al@20436 | 63 ../grub-mkimage \ |
al@20436 | 64 -d . \ |
pascal@20642 | 65 -o ../$bootimg \ |
pascal@20642 | 66 -O $EFI_ARCH-efi \ |
al@20436 | 67 -p /boot/grub \ |
pascal@20646 | 68 lsefisystab lssal lsefimmap lsacpi ls \ |
al@20436 | 69 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \ |
al@20436 | 70 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \ |
al@20436 | 71 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \ |
al@20436 | 72 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \ |
pascal@20649 | 73 scsi loopback normal configfile gzio all_video \ |
pascal@20649 | 74 gfxterm gettext echo || return 1 |
al@20436 | 75 |
pascal@20643 | 76 install -Dm644 $src/$bootimg $install/boot/efi/boot/$bootimg |
al@20436 | 77 ;; |
pascal@20355 | 78 esac |
pascal@13842 | 79 } |
pascal@13842 | 80 |
al@20436 | 81 genpkg_rules() { |
al@20436 | 82 case $PACKAGE in |
al@20436 | 83 grub2) |
al@20436 | 84 copy @std |
al@20436 | 85 DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper" |
al@20436 | 86 TAGS="LFS" |
al@20436 | 87 ;; |
al@20436 | 88 grub2-efi) |
al@20436 | 89 copy @std |
al@20436 | 90 DEPENDS=" " |
al@20436 | 91 ;; |
pascal@20650 | 92 grub2-efi-modules) |
pascal@20650 | 93 DEPENDS="grub2-efi" |
pascal@20652 | 94 case $ARCH in |
al@21064 | 95 i?86) efi_path=boot/efi/grub/i386-efi;; |
al@21064 | 96 x86_64) efi_path=boot/efi/grub/x86_64-efi;; |
pascal@20652 | 97 esac |
pascal@20653 | 98 mkdir -p $fs/$efi_path |
pascal@20653 | 99 cp $src/grub-core/*.mod $src/grub-core/*.lst $fs/$efi_path |
pascal@20650 | 100 ;; |
al@20436 | 101 esac |
al@20436 | 102 } |
pascal@13841 | 103 |
al@20436 | 104 post_install_grub2() { |
al@20436 | 105 [ -n "$quiet" ] || cat <<EOT |
pascal@13841 | 106 |
al@20436 | 107 .-------------------------------------------------------. |
al@20436 | 108 | # To install grub to your sda MBR | |
al@20436 | 109 | grub-install /dev/sda | |
al@20436 | 110 |-------------------------------------------------------| |
al@20436 | 111 | # To generate a configuration file | |
al@20436 | 112 | grub-mkconfig -o /boot/grub/grub.cfg | |
al@20436 | 113 |-------------------------------------------------------| |
al@20436 | 114 | # You can learn from /boot/grub/example-grub.cfg too. | |
al@20436 | 115 '-------------------------------------------------------' |
pascal@13841 | 116 EOT |
pascal@4478 | 117 } |