mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 08:47:13 +08:00
77 lines
2.5 KiB
Bash
Executable File
77 lines
2.5 KiB
Bash
Executable File
#
|
|
# Core Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer: Phil Miller <philm[at]chakra-project[dot]org
|
|
|
|
## This PKGBUILD has the same structure as the main grub2 split PKGBUILD for grub2-common, grub2-bios and grub2-efi-i386 .
|
|
|
|
# _grub2_rev=3238
|
|
|
|
_grub2_lua_ver=20
|
|
_grub2_gpxe_ver=12
|
|
|
|
pkgname="grub2-efi-x64"
|
|
pkgver='1.99'
|
|
pkgrel=2
|
|
pkgdesc="The GNU GRand Unified Bootloader version 2 - 64bit UEFI version"
|
|
url="http://www.gnu.org/software/grub/"
|
|
arch=('any')
|
|
license=('GPL3')
|
|
depends=("grub2-common=${pkgver}" 'dosfstools' 'efibootmgr')
|
|
optdepends=('mtools')
|
|
makedepends=('python2' 'xz' 'autogen' 'texinfo' 'help2man' 'gettext')
|
|
options=(strip purge docs zipman !emptydirs)
|
|
replaces=('grub2-efi-x86_64')
|
|
|
|
# "http://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
|
|
source=("ftp://ftp.gnu.org/gnu/grub/grub-1.99.tar.xz"
|
|
"http://chakra-project.org/sources/grub2/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
|
|
"http://chakra-project.org/sources/grub2/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz")
|
|
|
|
noextract=("grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
|
|
"grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz")
|
|
|
|
sha1sums=('a5ae9558f30ce7757a76aa130088b053a87e2fb6'
|
|
'd21ca5033f7069cbb36934cdb71f57a1c7829234'
|
|
'6c58eee654fa4eb7f057275b330710ffd4a9e989')
|
|
|
|
build() {
|
|
if [ "${CARCH}" = 'i686' ]; then
|
|
echo "This package can be built only in a x86_64 system. Exiting."
|
|
exit 1
|
|
fi
|
|
|
|
# add grub-extras
|
|
export GRUB_CONTRIB=${srcdir}/grub-${pkgver}/grub2-extras/
|
|
install -d ${srcdir}/grub-${pkgver}/grub2-extras
|
|
bsdtar xf ${srcdir}/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz \
|
|
-C ${srcdir}/grub-${pkgver}/grub2-extras
|
|
bsdtar xf ${srcdir}/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz \
|
|
-C ${srcdir}/grub-${pkgver}/grub2-extras
|
|
|
|
## need to use python2
|
|
sed -i 's|python|python2|' ${srcdir}/grub-${pkgver}/autogen.sh
|
|
|
|
# start the actual build process
|
|
cd ${srcdir}/grub-${pkgver}
|
|
./autogen.sh
|
|
CFLAGS="" ./configure --with-platform=efi \
|
|
--target=x86_64 --host=${CARCH}-unknown-linux-gnu \
|
|
--program-transform-name=s,grub,grub, \
|
|
--enable-mm-debug --disable-efiemu \
|
|
--enable-grub-mkfont --enable-nls \
|
|
--prefix=/usr --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
|
|
|
|
## remove non platform-specific files
|
|
rm -rf ${pkgdir}/{boot,bin,sbin,etc,usr/share}
|
|
rm ${pkgdir}/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
|
|
}
|