repo/core/grub/build

38 lines
787 B
Plaintext
Raw Normal View History

2019-06-19 06:59:59 +00:00
#!/bin/sh -e
2019-06-19 11:09:49 +00:00
(cd grub; patch -p1 < 0008-Fix-packed-not-aligned-error-on-GCC-8.patch)
# Grub is built in a function so the script argument needs to be stored.
pkg_dir=$1
build_grub() (
cp -R grub "grub-${1##*=}"
cd "grub-${1##*=}"
2019-06-25 17:24:29 +00:00
autoreconf -fi
2019-06-19 11:09:49 +00:00
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--disable-nls \
--disable-werror \
"$@"
make
make DESTDIR="$pkg_dir" install
)
build_grub --with-platform=pc
build_grub --with-platform=efi --disable-efiemu
2019-06-19 11:22:35 +00:00
# Remove gdb debugging files.
(
cd "$pkg_dir"
rm -f usr/lib/grub/*/*.module
rm -f usr/lib/grub/*/*.image
rm -f usr/lib/grub/*/kernel.exec
rm -f usr/lib/grub/*/gdb_grub
rm -f usr/lib/grub/*/gmodule.pl
2019-06-25 14:06:59 +00:00
rm -f usr/lib/charset.alias
2019-06-19 11:22:35 +00:00
) ||: