1 # Maintainer : Keshav P R <(the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
4 _GNU_EFI_LIB_DIR='/usr/lib'
7 _pkgname="${_actualname}-${_UEFI_ARCH}"
8 pkgname="${_pkgname}-git"
12 pkgdesc="Reference Implementation of a Linux Bootloader for ${_UEFI_ARCH} UEFI Firmwares"
14 url="https://github.com/mfleming/efilinux"
16 makedepends=('git' 'gnu-efi')
17 depends=('dosfstools' 'efibootmgr')
18 provides=("${_actualname}" "${_pkgname}")
19 conflicts=("${_actualname}" "${_pkgname}")
20 options=(!strip docs zipman purge !libtool emptydirs)
21 install="${_actualname}.install"
24 # _gitroot="git://git.kernel.org/pub/scm/boot/${_actualname}/${_actualname}.git"
25 _gitroot="git://github.com/mfleming/efilinux.git"
26 _gitname="${_actualname}"
33 msg "Connecting to GIT server...."
35 if [ -d "${srcdir}/${_gitname}/" ]
37 cd "${srcdir}/${_gitname}/"
40 git checkout "${_gitbranch}"
41 git merge "remotes/origin/${_gitbranch}"
42 msg "The local GIT repo has been updated."
44 git clone "${_gitroot}" "${_gitname}"
45 cd "${srcdir}/${_gitname}/"
46 git checkout "${_gitbranch}"
47 msg "GIT checkout done or server timeout"
56 if [ "${CARCH}" == 'x86_64' ]
60 elif [ "${_UEFI_ARCH}" == 'x86_64' ]
62 echo "This package can be built only in a x86_64 system."
66 rm -rf "${srcdir}/${_gitname}_build/" || true
67 cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}_build"
69 cd "${srcdir}/${_gitname}_build"
71 ## Change LIBDIR from /usr/lib64/ to /usr/lib/ in Makefile
72 sed 's|/usr/lib64|/usr/lib|g' -i "${srcdir}/${_gitname}_build/Makefile"
74 CFLAGS="" make ARCH="${_UEFI_ARCH}" CRT0="${_GNU_EFI_LIB_DIR}/crt0-efi-${_UEFI_ARCH}.o" LDSCRIPT="${_GNU_EFI_LIB_DIR}/elf_${_UEFI_ARCH}_efi.lds"
81 cd "${srcdir}/${_gitname}_build"
83 install -D -m644 "${srcdir}/${_gitname}_build/${_actualname}.efi" "${pkgdir}/boot/efi/efi/${_actualname}/${_actualname}.efi"