mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 17:04:36 +08:00
83 lines
2.7 KiB
Bash
83 lines
2.7 KiB
Bash
#
|
|
# Core Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
# include global config
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
pkgname=grub2
|
|
pkgver=1.98
|
|
pkgrel=1
|
|
pkgdesc="The GNU GRand Unified Bootloader"
|
|
url="http://www.gnu.org/software/grub/"
|
|
arch=('i686' 'x86_64')
|
|
license=('GPL3')
|
|
depends=('sh' 'lzo2' 'freetype2')
|
|
optdepends=('ruby:usr/share/grub/genmk.rb script' 'libusb: /sbin/grub-emu' 'gettext: /sbin/grub-mkconfig')
|
|
makedepends=('bdf-unifont' 'ruby')
|
|
backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
|
|
conflicts=('grub')
|
|
provides=('grub')
|
|
source=(ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz
|
|
'chakralinux-script-fixes.patch'
|
|
'gfxmenu-dependencies.patch'
|
|
'menucolors-in-mkconfig.patch'
|
|
'background-image-in-mkconfig.patch'
|
|
'hidden-timeout-fix.patch'
|
|
'grub.default'
|
|
'grub.cfg'
|
|
'20_memtest86+'
|
|
'lvm-detection.patch')
|
|
|
|
md5sums=('c0bcf60e524739bb64e3a2d4e3732a59'
|
|
'0910da120700a6928cd0290211acc79f'
|
|
'897f8af2fc83fcdaf7329da39f06d3dc'
|
|
'00ae9ff8991b8f00ab90739859af2921'
|
|
'fa14d3feabe17ac11dd3163501a66155'
|
|
'81bcdf26aa01b08b9925d72cbc4c3dab'
|
|
'6cdfe6bbe7e8fd0d6079d404d810f1bd'
|
|
'43cf74b91918e3bdec6dee0acc1c7032'
|
|
'5a07e04c4ecb8ed145d54fec3043e0d5'
|
|
'60b0157ed87041541ad0f62e3c7c0577')
|
|
|
|
build() {
|
|
cd $srcdir/grub-${pkgver}
|
|
|
|
# some random patches to facilitate automatic creation of grub.cfg
|
|
patch -Np1 -i ${srcdir}/chakralinux-script-fixes.patch
|
|
patch -Np1 -i ${srcdir}/gfxmenu-dependencies.patch
|
|
patch -Np1 -i ${srcdir}/menucolors-in-mkconfig.patch
|
|
patch -Np1 -i ${srcdir}/background-image-in-mkconfig.patch
|
|
patch -Np1 -i ${srcdir}/hidden-timeout-fix.patch
|
|
# fix lvm symlink detection
|
|
patch -Np0 -i ${srcdir}/lvm-detection.patch
|
|
# run autogen.sh to create configure files
|
|
./autogen.sh
|
|
|
|
# fix unifont.bdf location
|
|
sed -i 's|/usr/src/unifont.bdf|/usr/share/fonts/misc/unifont.bdf|' configure
|
|
|
|
CFLAGS= ./configure --prefix=/usr --enable-grub-mkfont --bindir=/bin \
|
|
--sbindir=/sbin --mandir=/usr/share/man \
|
|
--infodir=/usr/share/info --sysconfdir=/etc
|
|
|
|
CFLAGS= make
|
|
}
|
|
|
|
package() {
|
|
cd $srcdir/grub-${pkgver}
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
# install /etc/default/grub
|
|
install -Dm644 ${srcdir}/grub.default ${pkgdir}/etc/default/grub
|
|
|
|
# install grub.cfg (needed so it doesn't get removed on upgrading because it was previously here)
|
|
install -Dm644 ${srcdir}/grub.cfg ${pkgdir}/boot/grub/grub.cfg
|
|
|
|
# install memtest config detection
|
|
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
|
|
}
|
|
|