3.58. grub-2.04

#!/bin/sh
# Copyright © 1999-2022 Gerard Beekmans
# Copyright © 2017-2022 Random Crew
# Distributed under the terms of MIT License.

Configuration

Rule correction is done only for single version of LFS.

src_config()
{
    case ${LFS_VERSION} in
        10.1)
            sed "s/gold-version/& -R .note.gnu.property/" \
                -i Makefile.in grub-core/Makefile.in
        ;;
    esac

    ./configure \
        --prefix=${PREFIX} \
        --sbindir=/sbin \
        --sysconfdir=/etc \
        --disable-efiemu \
        --disable-werror
}

Compilation

src_compile()
{
    make ${MAKEOPTS}
}

Installation

src_install()
{
    make install ${MAKEOPTS} DESTDIR=${D}

    mkdir -p ${D}${PREFIX}/share/bash-completion/completions
    mv ${D}/etc/bash_completion.d/grub ${D}${PREFIX}/share/bash-completion/completions
}

Build code

grub.build

Other files

meta.txt
text

Links

url.lfs: https://linuxfromscratch.org/lfs/view/10.0/chapter08/grub.html
url.lfs.stage1: