wok-next view grub2/receipt @ rev 20636
Fix "can't execute '/usr/bin/update-mime-database': No such file or directory"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 27 15:12:17 2018 +0300 (2018-04-27) |
parents | ef8195de90bb |
children | b127c8621a46 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="grub2"
4 VERSION="2.02"
5 CATEGORY="base-system"
6 SHORT_DESC="GRUB2 boot loader"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.gnu.org/software/grub/"
10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/grub.html"
12 TARBALL="grub-$VERSION.tar.xz"
13 WGET_URL="ftp://ftp.gnu.org/gnu/grub/$TARBALL"
15 BUILD_DEPENDS="flex bison zlib-dev xz-dev freetype-dev ncurses-dev \
16 libusb-compat-dev libusb-dev libdevmapper-dev"
17 SPLIT="grub2 grub2-efi:efi"
19 compile_rules() {
20 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
21 util/getroot.c grub-core/kern/emu/hostdisk.c
23 # CVE-2015-8370
24 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c grub-core/normal/auth.c
26 # Fixes for flex 2.5.37
27 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"
28 sed -i '/#undef gets/{N;s/.*/#ifdef gets\n&\n#endif/}' grub-core/gnulib/stdio*h
29 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' grub-core/script/yylex.l
31 case $SET in
32 '')
33 #chmod +x install-sh
34 ./configure $CONFIGURE_ARGS &&
35 make $MAKEFLAGS &&
36 make DESTDIR=$DESTDIR install || return 1
38 # Example config file (grub.cfg)
39 install -Dm0644 $stuff/example-grub.cfg $install/boot/grub/example-grub.cfg
40 ;;
41 efi)
42 export EFI_ARCH=i386
43 ./configure \
44 --with-platform=efi \
45 --target=$EFI_ARCH \
46 --program-prefix="" \
47 $CONFIGURE_ARGS &&
48 make clean &&
49 make $MAKEFLAGS || return 1
51 cd grub-core
52 ../grub-mkimage \
53 -d . \
54 -o ../bootia32.efi \
55 -O i386-efi \
56 -p /boot/grub \
57 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
58 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
59 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
60 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
61 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
62 gfxterm gettext echo boot chain || return 1
64 install -Dm644 $src/bootia32.efi $install/boot/efi/boot/bootia32.efi
65 ;;
66 esac
67 }
69 genpkg_rules() {
70 case $PACKAGE in
71 grub2)
72 copy @std
73 DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper"
74 TAGS="LFS"
75 ;;
76 grub2-efi)
77 copy @std
78 DEPENDS=" "
79 ;;
80 esac
81 }
83 post_install_grub2() {
84 [ -n "$quiet" ] || cat <<EOT
86 .-------------------------------------------------------.
87 | # To install grub to your sda MBR |
88 | grub-install /dev/sda |
89 |-------------------------------------------------------|
90 | # To generate a configuration file |
91 | grub-mkconfig -o /boot/grub/grub.cfg |
92 |-------------------------------------------------------|
93 | # You can learn from /boot/grub/example-grub.cfg too. |
94 '-------------------------------------------------------'
95 EOT
96 }