wok-next diff grub2/receipt @ rev 20355

Up grub2 (2.02)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 19 18:31:14 2017 +0100 (2017-11-19)
parents de8ecd2ce530
children ef8195de90bb
line diff
     1.1 --- a/grub2/receipt	Wed Dec 16 18:01:12 2015 +0100
     1.2 +++ b/grub2/receipt	Sun Nov 19 18:31:14 2017 +0100
     1.3 @@ -1,28 +1,32 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="grub2"
     1.8  SOURCE="grub"
     1.9 -VERSION="2.00"
    1.10 +VERSION="2.02"
    1.11  CATEGORY="base-system"
    1.12 -SHORT_DESC="GRUB2 boot loader."
    1.13 +SHORT_DESC="GRUB2 boot loader"
    1.14  MAINTAINER="pascal.bellard@slitaz.org"
    1.15  LICENSE="GPL3"
    1.16  TARBALL="$SOURCE-$VERSION.tar.xz"
    1.17  WEB_SITE="http://www.gnu.org/software/grub/"
    1.18  WGET_URL="ftp://ftp.gnu.org/gnu/grub/$TARBALL"
    1.19  
    1.20 -DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper"
    1.21  BUILD_DEPENDS="flex bison zlib-dev xz-dev freetype-dev ncurses-dev \
    1.22  libusb-compat-dev libusb-dev libdevmapper-dev"
    1.23 +SPLIT="grub2 grub2-efi"
    1.24  
    1.25  # Rules to configure and make the package.
    1.26  compile_rules()
    1.27  {
    1.28 +	sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
    1.29 +		util/getroot.c util/raid.c grub-core/kern/emu/hostdisk.c
    1.30 +
    1.31  	# CVE-2015-8370
    1.32  	sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c grub-core/normal/auth.c
    1.33  
    1.34  	# Fixes for flex 2.5.37
    1.35 -	export CFLAGS="-Wno-error=sign-compare"
    1.36 +	export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"       
    1.37 +	sed -i '/#undef gets/{N;s/.*/#ifdef gets\n&\n#endif/}' grub-core/gnulib/stdio*h
    1.38  	sed -i 's/YY_FATAL_ERROR/REMOVED_&/' grub-core/script/yylex.l
    1.39  	
    1.40  	#chmod +x install-sh
    1.41 @@ -30,23 +34,47 @@
    1.42  	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    1.43  	make $MAKEFLAGS &&
    1.44  	make DESTDIR=$DESTDIR install
    1.45 +
    1.46 +	export EFI_ARCH=i386
    1.47 +	./configure --prefix=/usr --sysconfdir=/etc \
    1.48 +		--with-platform=efi --target=${EFI_ARCH} --program-prefix="" \
    1.49 +		--mandir=/usr/share/man $CONFIGURE_ARGS &&
    1.50 +	make clean &&
    1.51 +	make $MAKEFLAGS
    1.52 +	cd grub-core
    1.53 +	../grub-mkimage -d . -o ../bootia32.efi -O i386-efi -p /boot/grub \
    1.54 +		ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
    1.55 +		iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
    1.56 +		xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
    1.57 +		loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
    1.58 +		scsi loopback normal configfile gzio all_video efi_gop efi_uga \
    1.59 +		gfxterm gettext echo boot chain
    1.60  }
    1.61  
    1.62  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.63  genpkg_rules()
    1.64  {
    1.65 -	mkdir -p $fs/boot/grub $fs/usr
    1.66 -	cp -a $install/usr/bin $fs/usr
    1.67 -	cp -a $install/usr/sbin $fs/usr
    1.68 -	cp -a $install/usr/share $fs/usr
    1.69 -	cp -a $install/usr/lib $fs/usr
    1.70 -	cp -a $install/etc $fs
    1.71 -	
    1.72 -	# Example config file (grub.cfg).
    1.73 -	cp stuff/example-grub.cfg $fs/boot/grub
    1.74 +	case $PACKAGE in
    1.75 +	grub2)
    1.76 +		DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper"
    1.77 +		mkdir -p $fs/boot/grub $fs/usr
    1.78 +		cp -a $install/usr/bin $fs/usr
    1.79 +		cp -a $install/usr/sbin $fs/usr
    1.80 +		cp -a $install/usr/share $fs/usr
    1.81 +		cp -a $install/usr/lib $fs/usr
    1.82 +		cp -a $install/etc $fs
    1.83 +		
    1.84 +		# Example config file (grub.cfg).
    1.85 +		cp stuff/example-grub.cfg $fs/boot/grub
    1.86 +		;;
    1.87 +	grub2-efi)
    1.88 +		mkdir -p $fs/boot/efi/boot
    1.89 +		cp $src/bootia32.efi $fs/boot/efi/boot
    1.90 +		;;
    1.91 +	esac
    1.92  }
    1.93  
    1.94 -post_install()
    1.95 +post_install_grub2()
    1.96  {
    1.97  	cat <<EOT
    1.98  # To install grub to your sda MBR
    1.99 @@ -58,4 +86,3 @@
   1.100  # You can learn from /boot/grub/example-grub.cfg too.
   1.101  EOT
   1.102  }
   1.103 -