grub fix (untested)

This commit is contained in:
sulincix committed 2023-04-18 21:24:57 +00:00
1 parent 92482911cd
commit a4d47dffdf
1 file changed
+18 -12
+18 -12
View File
@@ -8,29 +8,35 @@ email='parduscix@yandex.ru'
maintainer='sulincix' maintainer='sulincix'
license=('GPLv3') license=('GPLv3')
source=("https://ftp.gnu.org/gnu/grub/grub-$version.tar.xz") source=("https://ftp.gnu.org/gnu/grub/grub-$version.tar.xz")
depends=(xz-utils) depends=()
makedepends=() makedepends=()
md5sums=('cf0fd928b1e5479c8108ee52cb114363') md5sums=('cf0fd928b1e5479c8108ee52cb114363')
group=() group=()
uses=() uses=()
arch=('x86_64') arch=('x86_64')
dontstrip=1
_target=(efi ia32 bios) target=(efi ia32 bios)
_target_opts=(
[efi]="--with-platform=efi --disable-efiemu" get_grub_opt(){
[ia32]="--with-platform=efi --target=i386 --disable-efiemu" if [[ "$1" == "efi" ]] ; then
[bios]="--with-platform=pc" echo -n "--with-platform=efi --disable-efiemu"
) elif [[ "$1" == "ia32" ]] ; then
echo -n "--with-platform=efi --target=i386 --disable-efiemu"
elif [[ "$1" == "bios" ]] ; then
echo -n "--with-platform=pc"
fi
}
prepare(){ prepare(){
for tgt in ${_target[@]} ; do for tgt in ${target[@]} ; do
cp -prfv $name-$version $tgt cp -prfv $name-$version $tgt
done done
} }
setup(){ setup(){
for tgt in ${_target[@]} ; do for tgt in ${target[@]} ; do
cd $tgt cd $tgt
autoreconf -fvi autoreconf -fvi
./configure --prefix=/usr \ ./configure --prefix=/usr \
@@ -39,19 +45,19 @@ setup(){
--disable-nls \ --disable-nls \
--disable-werror \ --disable-werror \
--disable-grub-themes \ --disable-grub-themes \
${_target_opts[$tgt]} $(get_grub_opt $tgt)
cd .. cd ..
done done
} }
build(){ build(){
for tgt in ${_target[@]} ; do for tgt in ${target[@]} ; do
make $jobs -C $tgt make $jobs -C $tgt
done done
} }
package(){ package(){
for tgt in ${_target[@]} ; do for tgt in ${target[@]} ; do
make $jobs -C $tgt install make $jobs -C $tgt install
done done
# remove gfx modules # remove gfx modules