From 952dc92356f6557c1d1d38c4ac3e4cd52afc82be Mon Sep 17 00:00:00 2001 From: Jan Alexander Steffens Date: Sun, 19 Nov 2017 20:58:56 +0000 Subject: [PATCH] 4.14: install modules directly to /usr/lib Signed-off-by: Oleksandr Natalenko --- PKGBUILD | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 01622ae..8e26e4e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -99,29 +99,26 @@ _package() { _basekernel=${_kernver%%-*} _basekernel=${_basekernel%.*} - mkdir -p "${pkgdir}"/{boot,lib/modules,usr} - make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install + mkdir -p "${pkgdir}"/{boot,usr/lib/modules} + make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # make room for external modules local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}" - ln -s "../${_extramodules}" "${pkgdir}/lib/modules/${_kernver}/extramodules" + ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules" # add real version for building modules and running depmod from hook echo "${_kernver}" | - install -Dm644 /dev/stdin "${pkgdir}/lib/modules/${_extramodules}/version" + install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version" # remove build and source links - rm "${pkgdir}"/lib/modules/${_kernver}/{source,build} + rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build} # now we call depmod... - depmod -b "${pkgdir}" -F System.map "${_kernver}" + depmod -b "${pkgdir}/usr" -F System.map "${_kernver}" # add vmlinux - install -Dt "${pkgdir}/lib/modules/${_kernver}/build" -m644 vmlinux - - # move module tree /lib -> /usr/lib - mv -t "${pkgdir}/usr" "${pkgdir}/lib" + install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux # sed expression for following substitutions local _subst="