grub/PKGBUILD

78 lines
2.2 KiB
Bash
Raw Normal View History

2024-10-15 20:34:46 +08:00
# Maintainer: Future Linux Team <futurelinux@163.com>
pkgname=grub
pkgver=2.12
_UNIFONT_VER=15.1.05
pkgrel=2
pkgdesc="GNU GRand Unified Bootloader (2)"
arch=('x86_64')
url="https://www.gnu.org/software/grub/"
license=('GPL-3.0-or-later')
depends=('bash' 'xz' 'gettext' 'device-mapper' 'efibootmgr')
makedepends=('rsync' 'freetype2' 'dejavu-fonts' 'python' 'texinfo' 'fuse3')
backup=(etc/default/grub
etc/grub.d/40_custom)
options=('!makeflags')
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz
https://unifoundry.com/pub/unifont/unifont-${_UNIFONT_VER}/font-builds/unifont-${_UNIFONT_VER}.pcf.gz
grub.default
grub.hook)
sha256sums=(f3c97391f7c4eaa677a78e090c7e97e6dc47b16f655f04683ebd37bef7fe0faa
ce973d6785d7be66bfb574583af000408a63c984bed573e268b645e3160f4dbc
401bda89d3e04f213c9e8202e6f9b69a1f0ff565c3964e08f2014b5aa11b42ae
bb537329e43b1a040e6360379da645a61e3f4c7ed203a987c67a9f2df12017e4)
prepare() {
cd ${pkgname}-${pkgver}
echo depends bli part_gpt > grub-core/extra_deps.lst
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"
gzip -cd ${srcdir}/unifont-${_UNIFONT_VER}.pcf.gz > unifont.pcf
autoreconf -ivf
}
build() {
cd ${pkgname}-${pkgver}
unset {C,CPP,CXX,LD}FLAGS
${CONFIGURE} \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--disable-efiemu \
--enable-nls \
--enable-grub-mkfont \
--enable-device-mapper \
--enable-cache-stats \
--enable-boot-time \
--enable-grub-mount \
--with-platform=efi \
--target=x86_64 \
--disable-silent-rules \
--disable-werror \
--program-prefix="" \
--with-grubdir="grub" \
--with-bootdir="/boot" \
FREETYPE="pkg-config freetype2" \
BUILD_FREETYPE="pkg-config freetype2"
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
make DESTDIR=${pkgdir} bashcompletiondir=/usr/share/bash-completion/completions install
rm -rf ${pkgdir}/etc/bash_completion.d
install -D -m0644 ${srcdir}/grub.default ${pkgdir}/etc/default/grub
install -vDm644 ${srcdir}/grub.hook ${pkgdir}/usr/share/libalpm/hooks/grub.hook
}