diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-10-04 19:51:51 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-10-04 19:52:20 -0300 |
commit | 63a876f40b45dea45fd3755dad61160e4c5eb199 (patch) | |
tree | bee958e86fc948574ef6cac52eef0e9ef216abd0 /libre/grub | |
parent | bf180c1480232303a80a7672df450a32d3b38e6f (diff) |
grub: add arm-emu support; rm groups, conflicts, replaces and provides on armv7h; rm duplicated code
Diffstat (limited to 'libre/grub')
-rw-r--r-- | libre/grub/PKGBUILD | 83 |
1 files changed, 25 insertions, 58 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD index 4a7df99d0..3cdf09621 100644 --- a/libre/grub/PKGBUILD +++ b/libre/grub/PKGBUILD @@ -25,13 +25,14 @@ _UNIFONT_VER="6.3.20131217" [[ "${CARCH}" == "x86_64" ]] && _XEN_ARCH="x86_64" [[ "${CARCH}" == "i686" ]] && _XEN_ARCH="i386" +[[ "${CARCH}" == "armv7h" ]] && _EMU_ARCH="arm" [[ "${CARCH}" == "x86_64" ]] && _EMU_ARCH="x86_64" [[ "${CARCH}" == "i686" ]] && _EMU_ARCH="i386" pkgname="grub" pkgdesc="GNU GRand Unified Bootloader (2), (Parabola rebranded)" pkgver=2.02.beta2 -pkgrel=5.parabola5 +pkgrel=5.parabola6 epoch="1" url="https://www.gnu.org/software/grub/" arch=('x86_64' 'i686' 'armv7h') @@ -44,13 +45,6 @@ conflicts=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-le replaces=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-parabola') provides=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}") -if [[ "${CARCH}" == "armv7h" ]]; then - groups=('base') - conflicts=('uboot-'{beagleboard,boundary,chiliboard,cubox-i,cubox,kirkwood,odroid-c1,odroid-xu3,droid,olinuxino,oxnas,pandaboard,sunxi,trimslice,udoo,usbarmory,wandboard,zedboard}) - replaces=('uboot-'{beagleboard,boundary,chiliboard,cubox-i,cubox,kirkwood,odroid-c1,odroid-xu3,droid,olinuxino,oxnas,pandaboard,sunxi,trimslice,udoo,usbarmory,wandboard,zedboard}) - provides=('uboot-'{beagleboard,boundary,chiliboard,cubox-i,cubox,kirkwood,odroid-c1,odroid-xu3,droid,olinuxino,oxnas,pandaboard,sunxi,trimslice,udoo,usbarmory,wandboard,zedboard}) -fi - makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen' 'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse') if [[ "${CARCH}" == "x86_64" ]] || [[ "${CARCH}" == "i686" ]]; then @@ -141,9 +135,14 @@ prepare() { msg "Avoid problem with unifont during compile of grub, http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847" cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf" "${srcdir}/grub-${_pkgver}/unifont.bdf" + +# msg "Add the grub-extra sources for BIOS build" +# install -d "${srcdir}/grub-${_pkgver}/grub-extras" +# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}/grub-extras/915resolution" # failed in compilation +# export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}/grub-extras/" } -_build_grub-common_and_bios() { +_build_grub-bios() { msg "Set ARCH dependent variables for BIOS build" if [[ "${CARCH}" == 'x86_64' ]]; then _EFIEMU="--enable-efiemu" @@ -155,11 +154,6 @@ _build_grub-common_and_bios() { cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-bios" cd "${srcdir}/grub-${_pkgver}-bios/" - msg "Add the grub-extra sources for BIOS build" - install -d "${srcdir}/grub-${_pkgver}-bios/grub-extras" -# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}-bios/grub-extras/915resolution" # failed in compilation - export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}-bios/grub-extras/" - msg "Unset all compiler FLAGS for BIOS build" unset CFLAGS unset CPPFLAGS @@ -204,11 +198,11 @@ _build_grub-common_and_bios() { echo } -_build_grub-common_and_uboot() { +_build_grub-uboot() { msg "Copy the source for building the U-Boot part" cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-uboot" cd "${srcdir}/grub-${_pkgver}-uboot/" - + msg "Unset all compiler FLAGS for bios build" unset CFLAGS unset CPPFLAGS @@ -258,11 +252,6 @@ _build_grub-qemu() { cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-qemu" cd "${srcdir}/grub-${_pkgver}-qemu/" - msg "Add the grub-extra sources for QEMU build" - install -d "${srcdir}/grub-${_pkgver}-qemu/grub-extras" -# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}-qemu/grub-extras/915resolution" # failed in compilation - export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}-qemu/grub-extras/" - msg "Unset all compiler FLAGS for QEMU build" unset CFLAGS unset CPPFLAGS @@ -312,11 +301,6 @@ _build_grub-ieee1275() { cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-ieee1275" cd "${srcdir}/grub-${_pkgver}-ieee1275/" - msg "Add the grub-extra sources for IEEE1275 (OpenFirmware) build" - install -d "${srcdir}/grub-${_pkgver}-ieee1275/grub-extras" -# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}-ieee1275/grub-extras/915resolution" # failed in compilation - export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}-ieee1275/grub-extras/" - msg "Unset all compiler FLAGS for IEEE1275 (OpenFirmware) build" unset CFLAGS unset CPPFLAGS @@ -366,11 +350,6 @@ _build_grub-libreboot() { cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-libreboot" cd "${srcdir}/grub-${_pkgver}-libreboot/" - msg "Add the grub-extra sources for Libreboot build" - install -d "${srcdir}/grub-${_pkgver}-libreboot/grub-extras" -# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}-libreboot/grub-extras/915resolution" # failed in compilation - export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}-libreboot/grub-extras/" - msg "Unset all compiler FLAGS for Libreboot build" unset CFLAGS unset CPPFLAGS @@ -420,11 +399,6 @@ _build_grub-multiboot() { cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-multiboot" cd "${srcdir}/grub-${_pkgver}-multiboot/" - msg "Add the grub-extra sources for Multiboot build" - install -d "${srcdir}/grub-${_pkgver}-multiboot/grub-extras" -# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}-multiboot/grub-extras/915resolution" # failed in compilation - export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}-multiboot/grub-extras/" - msg "Unset all compiler FLAGS for Multiboot build" unset CFLAGS unset CPPFLAGS @@ -522,11 +496,6 @@ _build_grub-xen() { msg "Copy the source for building the ${_XEN_ARCH} XEN part" cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-xen-${_XEN_ARCH}" cd "${srcdir}/grub-${_pkgver}-xen-${_XEN_ARCH}/" - - msg "Add the grub-extra sources for Multiboot build" - install -d "${srcdir}/grub-${_pkgver}-multiboot/grub-extras" -# cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-${_pkgver}-multiboot/grub-extras/915resolution" # failed in compilation - export GRUB_CONTRIB="${srcdir}/grub-${_pkgver}-multiboot/grub-extras/" msg "Unset all compiler FLAGS for ${_XEN_ARCH} XEN build" unset CFLAGS @@ -626,7 +595,7 @@ build() { if [[ "${CARCH}" == "x86_64" ]] || [[ "${CARCH}" == "i686" ]]; then msg "Build grub BIOS stuff" - _build_grub-common_and_bios + _build_grub-bios echo msg "Build grub QEMU stuff" @@ -656,7 +625,7 @@ build() { fi elif [[ "${CARCH}" == "armv7h" ]]; then msg "Build grub U-Boot stuff" - _build_grub-common_and_uboot + _build_grub-uboot echo fi @@ -679,7 +648,7 @@ build() { fi } -_package_grub-common_and_bios() { +_package_grub-bios() { cd "${srcdir}/grub-${_pkgver}-bios/" msg "Run make install for BIOS build" @@ -690,15 +659,9 @@ _package_grub-common_and_bios() { rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.module || true rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.image || true rm -f "${pkgdir}/usr/lib/grub/i386-pc"/{kernel.exec,gdb_grub,gmodule.pl} || true - - msg "Install extra /etc/grub.d/ files" - install -D -m0755 "${srcdir}/60_memtest86+" "${pkgdir}/etc/grub.d/60_memtest86+" - - msg "Install /etc/default/grub (used by grub-mkconfig)" - install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub" } -_package_grub-common_and_uboot() { +_package_grub-uboot() { cd "${srcdir}/grub-${_pkgver}-uboot/" msg "Run make install for U-Boot build" @@ -709,9 +672,6 @@ _package_grub-common_and_uboot() { rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.module || true rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.image || true rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/{kernel.exec,gdb_grub,gmodule.pl} || true - - msg "Install /etc/default/grub (used by grub-mkconfig)" - install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub" } _package_grub-qemu() { @@ -820,7 +780,7 @@ package() { fi fi - if [[ "${_GRUB_EMU_BUILD}" == "1" ]] && [[ "${CARCH}" != "armv7h" ]]; then + if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then msg "Package grub emu stuff" _package_grub-emu echo @@ -838,7 +798,7 @@ package() { fi msg "Package grub BIOS stuff" - _package_grub-common_and_bios + _package_grub-bios echo msg "Package grub QEMU stuff" @@ -856,9 +816,16 @@ package() { msg "Package grub Multiboot stuff" _package_grub-multiboot echo + + msg "Install extra /etc/grub.d/ files" + install -D -m0755 "${srcdir}/60_memtest86+" "${pkgdir}/etc/grub.d/60_memtest86+" + echo elif [[ "${CARCH}" == "armv7h" ]]; then msg "Package grub U-Boot stuff" - _package_grub-common_and_uboot + _package_grub-uboot echo - fi + fi + + msg "Install /etc/default/grub (used by grub-mkconfig)" + install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub" } |