diff options
author | Luke T. Shumaker <lukeshu@parabola.nu> | 2024-01-07 15:22:55 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@parabola.nu> | 2024-01-07 20:18:29 -0700 |
commit | a7ed3ea1f0f873ef80b4ef7d3548e3b5f984649d (patch) | |
tree | 70afa208ba5ff3bafcaf1a86e2d5ee7e5371af4c | |
parent | 620ba961e77afd0aab2c11db336334b588e84089 (diff) |
libre/grub: reduce formatting differences with upstream
This is formatting/comment/message/... changes only; no functional
changes.
-rw-r--r-- | libre/grub/PKGBUILD | 114 |
1 files changed, 62 insertions, 52 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD index 7a73b6e38..93bdf0d0b 100644 --- a/libre/grub/PKGBUILD +++ b/libre/grub/PKGBUILD @@ -52,34 +52,42 @@ # * --with-platform=qemu (a separate -kernel file for Qemu, x86-only) # * --with-platform=multiboot (x86-only) -## '1' to enable Xen support, '0' to disable -_XEN='0' +## "1" to enable Xen support, "0" to disable +_XEN="0" -## '1' to enable IA32-EFI build in Arch x86_64, '0' to disable -_IA32_EFI_IN_ARCH_X64='1' +## "1" to enable IA32-EFI build in Arch x86_64, "0" to disable +_IA32_EFI_IN_ARCH_X64="1" -## '1' to enable IA32-XEN build in Arch x86_64, "0" to disable -_IA32_XEN_IN_ARCH_X64='1' +## "1" to enable IA32-XEN build in Arch x86_64, "0" to disable +_IA32_XEN_IN_ARCH_X64="1" -## '1' to enable EMU build, "0" to disable -_GRUB_EMU_BUILD='0' +## "1" to enable EMU build, "0" to disable +_GRUB_EMU_BUILD="0" -[[ "${CARCH}" = 'armv7h' ]] && _EFI_ARCH='arm' -[[ "${CARCH}" = 'x86_64' ]] && _EFI_ARCH='x86_64' -[[ "${CARCH}" = 'i686' ]] && _EFI_ARCH='i386' +[[ "${CARCH}" == 'armv7h' ]] && _EFI_ARCH='arm' +[[ "${CARCH}" == 'x86_64' ]] && _EFI_ARCH='x86_64' +[[ "${CARCH}" == 'i686' ]] && _EFI_ARCH='i386' -[[ "${CARCH}" = 'x86_64' ]] && _XEN_ARCH='x86_64' -[[ "${CARCH}" = 'i686' ]] && _XEN_ARCH='i386' +[[ "${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' +[[ "${CARCH}" == 'armv7h' ]] && _EMU_ARCH='arm' +[[ "${CARCH}" == 'x86_64' ]] && _EMU_ARCH='x86_64' +[[ "${CARCH}" == 'i686' ]] && _EMU_ARCH='i386' pkgbase='grub' pkgname=('grub') -[[ $CARCH = armv7h ]] && pkgname+=('grub-am335x_bone' 'grub-udoo' 'grub-omap3_beagle' - 'grub-omap3_beagle_xm' 'grub-omap3_beagle_xm_ab') -pkgdesc='GNU GRand Unified Bootloader (2), (Parabola rebranded)' +if [[ $CARCH == armv7h ]]; then + pkgname+=( + 'grub-am335x_bone' + 'grub-udoo' + 'grub-omap3_beagle' + 'grub-omap3_beagle_xm' + 'grub-omap3_beagle_xm_ab' + ) +fi +pkgdesc='GNU GRand Unified Bootloader (2)' +pkgdesc+=', (Parabola rebranded)' epoch=2 _tag='53c5000739db114c229fe69ec3d4b76b92441098' # git rev-parse grub-${_pkgver} _gnulib_commit='be584c56eb1311606e5ea1a36363b97bddb6eed3' @@ -90,13 +98,25 @@ pkgrel=1 pkgrel+=.parabola1 url='https://www.gnu.org/software/grub/' arch=('x86_64') -arch+=('i686' 'armv7h') +arch+=('i686') +arch+=('armv7h') license=('GPL3') backup=('etc/default/grub' 'etc/grub.d/40_custom') install="${pkgname}.install" options=('!makeflags') +conflicts=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-legacy') +conflicts+=('grub-parabola') +replaces=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}") +replaces+=('grub-parabola') +provides=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}") +if [[ "${CARCH}" = 'armv7h' ]]; then + conflicts=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}") + replaces=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}") + provides=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}") +fi + makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen' 'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse2') depends=('sh' 'xz' 'gettext' 'device-mapper') @@ -112,25 +132,15 @@ if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then makedepends+=('xen') fi -if [[ "${_GRUB_EMU_BUILD}" = "1" ]]; then - makedepends+=('libusbx' 'sdl') - #optdepends+=('libusbx: For grub-emu USB support' # drop from the device-specific arm-uboot packages - # 'sdl: For grub-emu SDL support') # drop from the device-specific arm-uboot packages -fi - -if [[ "${CARCH}" = 'x86_64' ]] || [[ "${CARCH}" = 'i686' ]]; then - provides=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}") - conflicts=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-legacy' 'grub-parabola') - replaces=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-parabola') -elif [[ "${CARCH}" = 'armv7h' ]]; then - provides=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}") - conflicts=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}") - replaces=('grub-common' 'grub-emu' "grub-efi-${_EFI_ARCH}") +if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then + makedepends+=('libusbx' 'sdl') + #optdepends+=('libusbx: For grub-emu USB support' # drop from the device-specific arm-uboot packages + # 'sdl: For grub-emu SDL support') # drop from the device-specific arm-uboot packages fi validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> 'BE5C23209ACDDACEB20DB0A28C8189F1988C2166' # Daniel Kiper <dkiper@net-space.pl> - '95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy + '95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy <unifoundry@unifoundry.com> source=("git+https://git.savannah.gnu.org/git/grub.git#tag=${_tag}?signed" "git+https://git.savannah.gnu.org/git/gnulib.git#commit=${_gnulib_commit}" @@ -198,7 +208,7 @@ prepare() { echo "Patch to enable GRUB_COLOR_* variables in grub-mkconfig..." ## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html - patch -Np1 -i "${srcdir}/0001-00_header-add-GRUB_COLOR_-variables.patch" + patch -Np1 -i "${srcdir}/0001-00_header-add-GRUB_COLOR_-variables.patch" echo "Patch to detect of Parabola GNU/Linux-libre initramfs images by grub-mkconfig..." patch -Np1 -i "${srcdir}/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch" @@ -216,7 +226,7 @@ prepare() { ./linguas.sh echo "Avoid problem with unifont during compile of grub..." - # http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847 + # http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847 gzip -cd "${srcdir}/unifont-${_unifont_ver}.bdf.gz" > "unifont.bdf" echo "Run bootstrap..." @@ -263,15 +273,15 @@ _build_grub() { } _build_grub-bios() { - echo 'Set ARCH dependent variables for BIOS build...' + echo "Set ARCH dependent variables for bios build..." local _EFIEMU - if [[ "${CARCH}" = 'x86_64' ]]; then - _EFIEMU='--enable-efiemu' + if [[ "${CARCH}" == 'x86_64' ]]; then + _EFIEMU="--enable-efiemu" else - _EFIEMU='--disable-efiemu' + _EFIEMU="--disable-efiemu" fi - _build_grub 'bios' 'BIOS' \ + _build_grub 'bios' 'bios' \ 'i386-pc' \ "${_EFIEMU}" \ --enable-boot-time \ @@ -279,7 +289,7 @@ _build_grub-bios() { } _build_grub-efi() { - _build_grub "efi-${_EFI_ARCH}" "${_EFI_ARCH} EFI" \ + _build_grub "efi-${_EFI_ARCH}" "${_EFI_ARCH} efi" \ "${_EFI_ARCH}-efi" \ --disable-efiemu \ --enable-boot-time \ @@ -349,11 +359,11 @@ build() { # All-CPU platforms #################################################### _build_grub-efi - if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" = '1' ]]; then - _EFI_ARCH='i386' _build_grub-efi + if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then + _EFI_ARCH="i386" _build_grub-efi fi - if [[ "${_GRUB_EMU_BUILD}" = '1' ]]; then + if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then _build_grub-emu fi @@ -399,12 +409,12 @@ _package_grub() { } _package_grub-bios() { - _package_grub 'bios' 'BIOS' \ + _package_grub 'bios' 'bios' \ 'i386-pc' } _package_grub-efi() { - _package_grub "efi-${_EFI_ARCH}" "${_EFI_ARCH} EFI" \ + _package_grub "efi-${_EFI_ARCH}" "${_EFI_ARCH} efi" \ "${_EFI_ARCH}-efi" } @@ -458,11 +468,11 @@ package_grub() { # All-CPU platforms #################################################### _package_grub-efi - if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" = '1' ]]; then - _EFI_ARCH='i386' _package_grub-efi + if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then + _EFI_ARCH="i386" _package_grub-efi fi - if [[ "${_GRUB_EMU_BUILD}" = '1' ]]; then + if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then _package_grub-emu fi @@ -489,7 +499,7 @@ package_grub() { # Common ############################################################### - echo 'Install /etc/default/grub (used by grub-mkconfig)...' + echo "Install /etc/default/grub (used by grub-mkconfig)..." install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub" } |