mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-27 07:52:55 +02:00
New package: gummiboot-45
This commit is contained in:
parent
98cba0ae3f
commit
e4ab179ae9
4 changed files with 120 additions and 0 deletions
27
srcpkgs/gummiboot/INSTALL
Normal file
27
srcpkgs/gummiboot/INSTALL
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
case "$ACTION" in
|
||||||
|
post)
|
||||||
|
if [ "$UPDATE" = no ]; then
|
||||||
|
mkdir -p /boot/EFI/gummiboot
|
||||||
|
cat <<EOF
|
||||||
|
==========================================================================
|
||||||
|
|
||||||
|
Make gummiboot your default bootloader with:
|
||||||
|
|
||||||
|
$ mount -t efivarfs none /sys/firmware/efi/efivars
|
||||||
|
$ gummiboot install
|
||||||
|
|
||||||
|
Kernel options should be defined in /boot/loader/void-options.conf:
|
||||||
|
|
||||||
|
$ cat /boot/loader/void-options.conf
|
||||||
|
root=/dev/sda2 ro quiet
|
||||||
|
|
||||||
|
Reconfigure your kernel package to create loader entries:
|
||||||
|
|
||||||
|
$ xbps-reconfigure -f linux3.XX
|
||||||
|
|
||||||
|
==========================================================================
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
gummiboot update
|
||||||
|
;;
|
||||||
|
esac
|
39
srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install
Normal file
39
srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Kernel hook for gummiboot.
|
||||||
|
#
|
||||||
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||||
|
#
|
||||||
|
PKGNAME="$1"
|
||||||
|
VERSION="$2"
|
||||||
|
|
||||||
|
boot=$ROOTDIR/boot
|
||||||
|
entries=$boot/loader/entries
|
||||||
|
name=void-$PKGNAME-$VERSION
|
||||||
|
entry=$entries/$name.conf
|
||||||
|
options=$boot/loader/void-options.conf
|
||||||
|
loader=$boot/loader/loader.conf
|
||||||
|
|
||||||
|
[ -d $boot ] || exit 0
|
||||||
|
|
||||||
|
mkdir -p $entries
|
||||||
|
|
||||||
|
cat <<-EOF > $entry
|
||||||
|
title Void $PGNAME
|
||||||
|
version $VERSION
|
||||||
|
linux /vmlinuz-$VERSION
|
||||||
|
initrd /initramfs-$VERSION.img
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -r $options ]; then
|
||||||
|
# Add user provided options from /boot/loader/void-options.conf:
|
||||||
|
printf 'options %s\n' "$(cat $options | sed '/^#/d;/^$/d')" >> $entry
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -q ^default $loader 2>/dev/null; then
|
||||||
|
# Replace existing default entry with this entry:
|
||||||
|
sed -i "s/default.*/default $name/" $loader
|
||||||
|
else
|
||||||
|
# Add this entry as the default:
|
||||||
|
printf 'default %s\n' $name >>$loader
|
||||||
|
fi
|
21
srcpkgs/gummiboot/files/kernel.d/gummiboot.post-remove
Normal file
21
srcpkgs/gummiboot/files/kernel.d/gummiboot.post-remove
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Kernel hook for gummiboot.
|
||||||
|
#
|
||||||
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||||
|
#
|
||||||
|
PKGNAME="$1"
|
||||||
|
VERSION="$2"
|
||||||
|
|
||||||
|
boot=$ROOTDIR/boot
|
||||||
|
entries=$boot/loader/entries
|
||||||
|
name=void-$PKGNAME-$VERSION
|
||||||
|
entry=$entries/$name.conf
|
||||||
|
loader=$boot/loader/loader.conf
|
||||||
|
|
||||||
|
[ -d $boot ] || exit 0
|
||||||
|
|
||||||
|
rm -f $entry
|
||||||
|
|
||||||
|
# No default entry if the removed entry was the default:
|
||||||
|
sed -i "/^default $name\$/d" $loader
|
33
srcpkgs/gummiboot/template
Normal file
33
srcpkgs/gummiboot/template
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Template file for 'gummiboot'
|
||||||
|
pkgname=gummiboot
|
||||||
|
version=45
|
||||||
|
revision=1
|
||||||
|
build_style=gnu-configure
|
||||||
|
hostmakedepends="automake autoconf pkg-config libxslt docbook-xsl"
|
||||||
|
makedepends="gnu-efi-libs liblzma-devel libblkid-devel"
|
||||||
|
short_desc="Simple UEFI Boot Manager"
|
||||||
|
maintainer="Eivind Uggedal <eivind@uggedal.com>"
|
||||||
|
homepage="http://freedesktop.org/wiki/Software/gummiboot"
|
||||||
|
license="LGPL-2.1"
|
||||||
|
distfiles="http://cgit.freedesktop.org/${pkgname}/snapshot/${pkgname}-${version}.tar.gz"
|
||||||
|
checksum=78f47105bab676b8ff2d19c1deedaa4c371f10e4fd49059f9d588c6f97544a9b
|
||||||
|
only_for_archs="i686 x86_64"
|
||||||
|
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
configure_args="--with-efi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
|
||||||
|
--with-efi-libdir=${XBPS_CROSS_BASE}/usr/lib
|
||||||
|
--with-efi-includedir=${XBPS_CROSS_BASE}/usr/include"
|
||||||
|
else
|
||||||
|
configure_args="--with-efi-ldsdir=/usr/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
./autogen.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vinstall ${FILESDIR}/kernel.d/gummiboot.post-install 750 \
|
||||||
|
etc/kernel.d/post-install 50-gummiboot
|
||||||
|
vinstall ${FILESDIR}/kernel.d/gummiboot.post-remove 750 \
|
||||||
|
etc/kernel.d/post-remove 50-gummiboot
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue