aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-04-13 02:20:51 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-04-13 06:42:23 +0000
commitc3997536026a15e8f571477b13c24caebccf3ab4 (patch)
tree2727952bd0fbfef0cbcb64e7a9097ea3fa5298ef
parent405408de67201e5143dc282db59ab7d6ecf68e9e (diff)
downloadaports-c3997536026a15e8f571477b13c24caebccf3ab4.tar.gz
aports-c3997536026a15e8f571477b13c24caebccf3ab4.tar.bz2
aports-c3997536026a15e8f571477b13c24caebccf3ab4.tar.xz
main/grub: modernize
-rw-r--r--main/grub/APKBUILD48
1 files changed, 30 insertions, 18 deletions
diff --git a/main/grub/APKBUILD b/main/grub/APKBUILD
index 3168d3aa0c..a08d290fac 100644
--- a/main/grub/APKBUILD
+++ b/main/grub/APKBUILD
@@ -2,30 +2,32 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=grub
pkgver=2.04
-pkgrel=0
+pkgrel=1
pkgdesc="Bootloader with support for Linux, Multiboot and more"
url="https://www.gnu.org/software/grub/"
arch="all !s390x"
license="GPL-3.0-or-later"
depends="mkinitfs"
triggers="grub.trigger=/boot"
-depends_dev=""
-makedepends="$depends_dev bison flex linux-headers xz-dev lvm2-dev
+makedepends="bison flex linux-headers xz-dev lvm2-dev
automake autoconf libtool python3 freetype-dev unifont gettext-dev"
install="$pkgname.post-upgrade"
# strip handled by grub Makefiles, abuild strip breaks xen pv-grub
options="!check !strip" # Cannot test boot loader.
-subpackages="$pkgname-dev $pkgname-doc"
+subpackages="
+ $pkgname-dev
+ $pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ "
# currently grub only builds on x86*, aarch64 and ppc* systems
-flavors=""
case "$CARCH" in
-x86) flavors="efi bios";;
-x86_64) flavors="efi bios xenhost xenhost_pvh";;
-aarch64|arm*) flavors="efi";;
-mips*) flavors="qemu_mips";;
-ppc*) flavors="ieee1275"; makedepends="$makedepends powerpc-utils" ;;
-s390x) flavors="emu" ;;
+ x86) flavors="efi bios";;
+ x86_64) flavors="efi bios xenhost xenhost_pvh";;
+ aarch64|arm*) flavors="efi";;
+ mips*) flavors="qemu_mips";;
+ ppc*) flavors="ieee1275"; makedepends="$makedepends powerpc-utils" ;;
+ s390x) flavors="emu" ;;
esac
for f in $flavors; do
[ x"$f" = x"xenhost_pvh" ] && continue # xenhost_pvh shipped in the xenhost subpackage
@@ -38,7 +40,6 @@ source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz
alpine-mkconfig.patch
lang-C.UTF-8.patch
"
-builddir="$srcdir/grub-$pkgver"
prepare() {
default_prepare
@@ -82,9 +83,9 @@ build() {
}
_install_xen() {
- grub_dir=`mktemp -d`
- cfg=`mktemp`
- grub_memdisk=`mktemp`
+ grub_dir=$(mktemp -d)
+ cfg=$(mktemp)
+ grub_memdisk=$(mktemp)
mkdir -p $grub_dir/boot/grub
echo 'normal (memdisk)/grub.cfg' > $cfg
@@ -105,9 +106,9 @@ _install_xen() {
}
_install_xenpvh() {
- grub_dir=`mktemp -d`
- cfg=`mktemp`
- grub_memdisk=`mktemp`
+ grub_dir=$(mktemp -d)
+ cfg=$(mktemp)
+ grub_memdisk=$(mktemp)
mkdir -p $grub_dir/boot/grub
echo 'normal (memdisk)/grub.cfg' > $cfg
@@ -157,6 +158,9 @@ package() {
GRUB_DISABLE_SUBMENU=y
GRUB_DISABLE_RECOVERY=true
EOF
+
+ mkdir -p "$pkgdir"/usr/share/bash-completion
+ mv "$pkgdir"/etc/bash_completion.d "$pkgdir"/usr/share/bash-completion/completions
}
bios() {
@@ -203,6 +207,14 @@ emu() {
mv $pkgdir/usr/lib/grub/*-emu $subpkgdir/usr/lib/grub/
}
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ amove usr/share/bash-completion/completions
+}
+
sha512sums="9c15c42d0cf5d61446b752194e3b628bb04be0fe6ea0240ab62b3d753784712744846e1f7c3651d8e0968d22012e6d713c38c44936d4004ded3ca4d4007babbb grub-2.04.tar.xz
f2a7d9ab6c445f4e402e790db56378cecd6631b5c367451aa6ce5c01cd95b95c83c3dd24d6d4b857f8f42601eba82c855607513eb6ce5b2af6bd6c71f046e288 fix-gcc-no-pie-specs.patch
4e7394e0fff6772c89683039ccf81099ebbfe4f498e6df408977a1488fd59389b6e19afdbf0860ec271e2b2aea0df7216243dcc8235d1ca3af0e7f4d0a9d60a4 grub-xen-host_grub.cfg