wok-next view grub2/receipt @ rev 21331

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