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'
license=('GPLv3')
source=("https://ftp.gnu.org/gnu/grub/grub-$version.tar.xz")
depends=(xz-utils)
depends=()
makedepends=()
md5sums=('cf0fd928b1e5479c8108ee52cb114363')
group=()
uses=()
arch=('x86_64')
dontstrip=1
_target=(efi ia32 bios)
target=(efi ia32 bios)
_target_opts=(
[efi]="--with-platform=efi --disable-efiemu"
[ia32]="--with-platform=efi --target=i386 --disable-efiemu"
[bios]="--with-platform=pc"
)
get_grub_opt(){
if [[ "$1" == "efi" ]] ; then
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(){
for tgt in ${_target[@]} ; do
for tgt in ${target[@]} ; do
cp -prfv $name-$version $tgt
done
}
setup(){
for tgt in ${_target[@]} ; do
for tgt in ${target[@]} ; do
cd $tgt
autoreconf -fvi
./configure --prefix=/usr \
@@ -39,19 +45,19 @@ setup(){
--disable-nls \
--disable-werror \
--disable-grub-themes \
${_target_opts[$tgt]}
$(get_grub_opt $tgt)
cd ..
done
}
build(){
for tgt in ${_target[@]} ; do
for tgt in ${target[@]} ; do
make $jobs -C $tgt
done
}
package(){
for tgt in ${_target[@]} ; do
for tgt in ${target[@]} ; do
make $jobs -C $tgt install
done
# remove gfx modules