summaryrefslogtreecommitdiff
path: root/repo/grub/grub.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/grub/grub.xibuild
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'repo/grub/grub.xibuild')
-rw-r--r--repo/grub/grub.xibuild36
1 files changed, 29 insertions, 7 deletions
diff --git a/repo/grub/grub.xibuild b/repo/grub/grub.xibuild
index ac331b3..696055a 100644
--- a/repo/grub/grub.xibuild
+++ b/repo/grub/grub.xibuild
@@ -1,7 +1,7 @@
#!/bin/sh
-MAKEDEPS="make "
-DEPS="sh xz gettext efibootmgr freetype2"
+MAKEDEPS="make sh xz gettext efibootmgr freetype2"
+DEPS="efibootmgr"
PKG_VER=2.06
SOURCE=https://ftp.gnu.org/gnu/grub/grub-$PKG_VER.tar.xz
@@ -12,20 +12,39 @@ ADDITIONAL="
DESC="GNU GRand Unified Bootloader v2"
+flavours="bios efi"
+
prepare () {
- gunzip -c unifont-13.0.06.pcf.gz > $PKG_DEST/usr/share/fonts/unifont/unifont.pcf
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ for f in $flavours; do
+ mkdir $BUILD_ROOT/build-$f
+ tar -C build-$f -xvf grub-$PKG_VER.tar.xz
+ done
}
build () {
- ./configure --prefix=/usr --sysconfdir=/etc --disable-werror \
- --disable-efiemu --enable-grub-mkfont --with-platform=efi --with-platform=pc
- make
+ for f in $flavours; do
+ cd $BUILD_ROOT/build-$f/grub-$PKG_VER
+ case "$f" in
+ bios) opts="--with-platform=pc";;
+ efi) opts="--with-platform=efi --disable-efiemu";;
+ esac
+
+ ./configure --prefix=/usr --sysconfdir=/etc --disable-werror \
+ --enable-grub-mkfont $opts
+ make
+ done
+
}
package () {
- make DESTDIR=$PKG_DEST install
+ for f in $flavours; do
+ cd $BUILD_ROOT/build-$f/grub-$PKG_VER
+ make DESTDIR=$PKG_DEST install-strip
+ done
+ cd $BUILD_ROOT
+
mkdir -p $PKG_DEST/usr/share/bash-completion/completions
mv $PKG_DEST/etc/bash_completion.d/grub $PKG_DEST/usr/share/bash-completion/completions
mkdir -p $PKG_DEST/etc/default
@@ -40,4 +59,7 @@ GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
EOF
+
+ mkdir -p $PKG_DEST/usr/share/fonts/unifont
+ gunzip -c unifont-13.0.06.pcf.gz > $PKG_DEST/usr/share/fonts/unifont/unifont.pcf
}