mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-23 22:36:18 +00:00
40 lines
813 B
Bash
Executable File
40 lines
813 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
(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##*=}"
|
|
|
|
autoreconf -fi
|
|
|
|
./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
|
|
|
|
# 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
|
|
) ||:
|
|
|
|
# Remove conflicting file.
|
|
rm "$1/usr/lib/charset.alias"
|