diff options
author | Keshav Amburay | 2013-06-17 13:59:51 +0530 |
---|---|---|
committer | Keshav Amburay | 2013-06-17 13:59:51 +0530 |
commit | 4636a35440becc9931cc8f9b880959ddd672283c (patch) | |
tree | f90958b36f7d5e4e86eb45f7f50cdeab21c0f04d | |
parent | 08fecc118364ba72e0a703a862a6111e6a2e943f (diff) | |
download | aur-4636a35440becc9931cc8f9b880959ddd672283c.tar.gz |
Enable gnu-efi ms_abi support
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | elilo.conf (renamed from elilo.conf.example) | 6 |
3 files changed, 57 insertions, 37 deletions
@@ -1,7 +1,7 @@ pkgbase = elilo-efi pkgdesc = UEFI version of LILO Boot Loader pkgver = 3.16 - pkgrel = 1 + pkgrel = 2 url = http://sourceforge.net/projects/elilo/ install = elilo-efi.install arch = any @@ -10,14 +10,14 @@ pkgbase = elilo-efi depends = dosfstools depends = efibootmgr options = !strip - options = purge + options = !purge options = !libtool options = !emptydirs options = !makeflags source = http://downloads.sourceforge.net/project/elilo/elilo/elilo-3.16/elilo-3.16-all.tar.gz - source = elilo.conf.example + source = elilo.conf sha1sums = bd0bd4f1b3dc2d23a304f957ffbf907ae104f323 - sha1sums = b961f6181504f7d1bf4b14f76c0477159fc54445 + sha1sums = 2366629b137572f91774a0bdf907864dd7fe3172 pkgname = elilo-efi @@ -4,7 +4,7 @@ _pkgname="elilo" pkgname="${_pkgname}-efi" pkgver="3.16" -pkgrel="1" +pkgrel="2" pkgdesc="UEFI version of LILO Boot Loader" arch=('any') url="http://sourceforge.net/projects/elilo/" @@ -12,74 +12,94 @@ license=('GPL') makedepends=('gnu-efi-libs') depends=('dosfstools' 'efibootmgr') -options=('!strip' 'purge' '!libtool' '!emptydirs' '!makeflags') +options=('!strip' '!purge' '!libtool' '!emptydirs' '!makeflags') install="${pkgname}.install" source=("http://downloads.sourceforge.net/project/elilo/elilo/elilo-${pkgver}/elilo-${pkgver}-all.tar.gz" - "elilo.conf.example") + "elilo.conf") sha1sums=('bd0bd4f1b3dc2d23a304f957ffbf907ae104f323' - 'b961f6181504f7d1bf4b14f76c0477159fc54445') + '2366629b137572f91774a0bdf907864dd7fe3172') -build() { - - if [[ "${CARCH}" != "x86_64" ]]; then - echo "${pkgname} package can be built only in a x86_64 system. Exiting." - exit 1 - else - cd "${srcdir}/" - bsdtar xf "${srcdir}/elilo-${pkgver}-source.tar.gz" - fi - - cd "${srcdir}/elilo-${pkgver}-source/" - rm -f "${srcdir}"/*.efi || true - rm -f "${srcdir}/elilo-${pkgver}-source.tar.gz" || true - - ## Fix ARCH Makefile variable - sed 's|ARCH :=|ARCH ?=|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true - sed 's|dpkg-architecture -qDEB_BUILD_ARCH|uname -m|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true - - ## Fix -Werror issues - sed 's|DEBUGFLAGS = -Wall|DEBUGFLAGS = -Wall -Wno-error|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true - - ## Enable ext2 drivers - build fails for now - # sed 's|^CONFIG_ext2fs=n|CONFIG_ext2fs=y|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true +_build_elilo-efi-x86_64() { cp -r "${srcdir}/elilo-${pkgver}-source" "${srcdir}/elilo-${pkgver}-x86_64" cd "${srcdir}/elilo-${pkgver}-x86_64/" + ## Unset all compiler FLAGS unset CFLAGS unset CPPFLAGS unset CXXFLAGS unset LDFLAGS unset MAKEFLAGS - ARCH="x86_64" make + echo + make ARCH="x86_64" echo +} + +_build_elilo-efi-ia32() { + cp -r "${srcdir}/elilo-${pkgver}-source" "${srcdir}/elilo-${pkgver}-ia32" cd "${srcdir}/elilo-${pkgver}-ia32/" + ## Unset all compiler FLAGS unset CFLAGS unset CPPFLAGS unset CXXFLAGS unset LDFLAGS unset MAKEFLAGS - ARCH="ia32" make echo + make ARCH="ia32" + echo + +} + +build() { + + if [[ "${CARCH}" != "x86_64" ]]; then + echo "${pkgname} package can be built only in a x86_64 system. Exiting." + exit 1 + fi + + bsdtar -C "${srcdir}/" -xf "${srcdir}/elilo-${pkgver}-source.tar.gz" + + cd "${srcdir}/elilo-${pkgver}-source/" + + ## Delete unwanted files + rm -f "${srcdir}"/*.efi || true + rm -f "${srcdir}/elilo-${pkgver}-source.tar.gz" || true + + ## Enable gnu-efi ms_abi support + sed 's|-fno-stack-protector|-DGNU_EFI_USE_MS_ABI -fno-stack-protector|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true + + ## Use "uname -m" to determine ARCH + sed 's|dpkg-architecture -qDEB_BUILD_ARCH|uname -m|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true + + ## Fix -Werror build failure + sed 's|DEBUGFLAGS = -Wall|DEBUGFLAGS = -Wall -Wno-error|g' -i "${srcdir}/elilo-${pkgver}-source/Make.defaults" || true + + ## Compile elilox64.efi + _build_elilo-efi-x86_64 + + ## Compile eliloia32.efi + _build_elilo-efi-ia32 } package() { + ## Install elilox64.efi and eliloia32.efi install -d "${pkgdir}/usr/lib/elilo" install -D -m0644 "${srcdir}/elilo-${pkgver}-x86_64/elilo.efi" "${pkgdir}/usr/lib/elilo/elilox64.efi" install -D -m0644 "${srcdir}/elilo-${pkgver}-ia32/elilo.efi" "${pkgdir}/usr/lib/elilo/eliloia32.efi" + ## Install example elilo.conf install -d "${pkgdir}/usr/lib/elilo/config" - install -D -m0644 "${srcdir}/elilo.conf.example" "${pkgdir}/usr/lib/elilo/config/elilo.conf" + install -D -m0644 "${srcdir}/elilo.conf" "${pkgdir}/usr/lib/elilo/config/elilo.conf" } diff --git a/elilo.conf.example b/elilo.conf index f70e1f8f4e55..56f15344d429 100644 --- a/elilo.conf.example +++ b/elilo.conf @@ -2,14 +2,14 @@ prompt default=arch -timeout=10 +timeout=5 image=/EFI/arch/vmlinuz-arch.efi label=arch - append="root=PARTUUID=XXXXXXXXXX rootfstype=ext4 add_efi_memmap" + append="root=PARTUUID=XXXXXXXXXX rootfstype=XXXX efi_no_storage_paranoia add_efi_memmap" initrd=/EFI/arch/initramfs-arch.img image=/EFI/arch/vmlinuz-arch.efi label=arch-fallback - append="root=PARTUUID=XXXXXXXXXX rootfstype=ext4 add_efi_memmap" + append="root=PARTUUID=XXXXXXXXXX rootfstype=XXXX efi_no_storage_paranoia add_efi_memmap" initrd=/EFI/arch/initramfs-arch-fallback.img |