From 2bc8cf05ec665606ab433229db35262e339446ed Mon Sep 17 00:00:00 2001 From: Dan Ziemba Date: Thu, 2 Jul 2015 23:32:25 -0400 Subject: [PATCH] Fixed separate build of linux-vfio-headers package Applied patch from https://bugs.archlinux.org/task/43885 to fix the undefined KARCH variable. --- PKGBUILD | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index ec74fe2..028f771 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -37,6 +37,8 @@ validpgpkeys=( ) _kernelname=${pkgbase#linux} +_KARCH=x86 + prepare() { cd "${srcdir}/${_srcname}" @@ -109,8 +111,6 @@ _package() { cd "${srcdir}/${_srcname}" - KARCH=x86 - # get kernel version _kernver="$(make LOCALVERSION= kernelrelease)" _basekernel=${_kernver%%-*} @@ -118,7 +118,7 @@ _package() { mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install - cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" + cp arch/$_KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # set correct depmod command for install cp -f "${startdir}/${install}" "${startdir}/${install}.pkg" @@ -193,15 +193,15 @@ _package-headers() { chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions" - mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel" + mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${_KARCH}/kernel" - cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/" + cp arch/${_KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${_KARCH}/" if [ "${CARCH}" = "i686" ]; then - cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/" + cp arch/${_KARCH}/Makefile_32.cpu "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${_KARCH}/" fi - cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/" + cp arch/${_KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${_KARCH}/kernel/" # add docbook makefile install -D -m644 Documentation/DocBook/Makefile \