wok-next annotate grub2/receipt @ rev 20427
Up cookutils (1024), tazpkg (957)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jan 24 12:19:58 2018 +0200 (2018-01-24) |
parents | 29e7eb2b19f9 |
children | 90a5eb560fd6 |
rev | line source |
---|---|
pascal@20355 | 1 # SliTaz package receipt v2. |
pascal@4478 | 2 |
pascal@4478 | 3 PACKAGE="grub2" |
pascal@4478 | 4 SOURCE="grub" |
pascal@20355 | 5 VERSION="2.02" |
pascal@4478 | 6 CATEGORY="base-system" |
pascal@20355 | 7 SHORT_DESC="GRUB2 boot loader" |
pascal@4478 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14999 | 9 LICENSE="GPL3" |
pascal@13114 | 10 TARBALL="$SOURCE-$VERSION.tar.xz" |
pascal@14999 | 11 WEB_SITE="http://www.gnu.org/software/grub/" |
pascal@14999 | 12 WGET_URL="ftp://ftp.gnu.org/gnu/grub/$TARBALL" |
pascal@14999 | 13 |
pascal@13115 | 14 BUILD_DEPENDS="flex bison zlib-dev xz-dev freetype-dev ncurses-dev \ |
pascal@13115 | 15 libusb-compat-dev libusb-dev libdevmapper-dev" |
pascal@20355 | 16 SPLIT="grub2 grub2-efi" |
pascal@4478 | 17 |
pascal@4478 | 18 # Rules to configure and make the package. |
pascal@4478 | 19 compile_rules() |
pascal@4478 | 20 { |
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 |
pascal@20355 | 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@13386 | 31 |
pascal@13842 | 32 #chmod +x install-sh |
pascal@4478 | 33 ./configure --prefix=/usr --sysconfdir=/etc \ |
pascal@4478 | 34 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@15265 | 35 make $MAKEFLAGS && |
pascal@13114 | 36 make DESTDIR=$DESTDIR install |
pascal@20355 | 37 |
pascal@20355 | 38 export EFI_ARCH=i386 |
pascal@20355 | 39 ./configure --prefix=/usr --sysconfdir=/etc \ |
pascal@20355 | 40 --with-platform=efi --target=${EFI_ARCH} --program-prefix="" \ |
pascal@20355 | 41 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@20355 | 42 make clean && |
pascal@20355 | 43 make $MAKEFLAGS |
pascal@20355 | 44 cd grub-core |
pascal@20355 | 45 ../grub-mkimage -d . -o ../bootia32.efi -O i386-efi -p /boot/grub \ |
pascal@20355 | 46 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \ |
pascal@20355 | 47 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \ |
pascal@20355 | 48 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \ |
pascal@20355 | 49 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \ |
pascal@20355 | 50 scsi loopback normal configfile gzio all_video efi_gop efi_uga \ |
pascal@20355 | 51 gfxterm gettext echo boot chain |
pascal@4478 | 52 } |
pascal@4478 | 53 |
pascal@4478 | 54 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@4478 | 55 genpkg_rules() |
pascal@4478 | 56 { |
pascal@20355 | 57 case $PACKAGE in |
pascal@20355 | 58 grub2) |
pascal@20355 | 59 DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper" |
pascal@20355 | 60 mkdir -p $fs/boot/grub $fs/usr |
pascal@20355 | 61 cp -a $install/usr/bin $fs/usr |
pascal@20355 | 62 cp -a $install/usr/sbin $fs/usr |
pascal@20355 | 63 cp -a $install/usr/share $fs/usr |
pascal@20355 | 64 cp -a $install/usr/lib $fs/usr |
pascal@20355 | 65 cp -a $install/etc $fs |
pascal@20355 | 66 |
pascal@20355 | 67 # Example config file (grub.cfg). |
pascal@20355 | 68 cp stuff/example-grub.cfg $fs/boot/grub |
pascal@20355 | 69 ;; |
pascal@20355 | 70 grub2-efi) |
pascal@20355 | 71 mkdir -p $fs/boot/efi/boot |
pascal@20355 | 72 cp $src/bootia32.efi $fs/boot/efi/boot |
pascal@20355 | 73 ;; |
pascal@20355 | 74 esac |
pascal@13842 | 75 } |
pascal@13842 | 76 |
pascal@20355 | 77 post_install_grub2() |
pascal@13842 | 78 { |
pascal@13841 | 79 cat <<EOT |
pascal@13841 | 80 # To install grub to your sda MBR |
pascal@13841 | 81 grub-install /dev/sda |
pascal@13841 | 82 |
pascal@13841 | 83 # To generate a configuration file |
pascal@13841 | 84 grub-mkconfig -o /boot/grub/grub.cfg |
pascal@13841 | 85 |
pascal@13841 | 86 # You can learn from /boot/grub/example-grub.cfg too. |
pascal@13841 | 87 EOT |
pascal@4478 | 88 } |