diff options
author | David P <megver83@openmailbox.org> | 2017-10-03 19:51:45 -0300 |
---|---|---|
committer | David P <megver83@openmailbox.org> | 2017-10-03 19:51:45 -0300 |
commit | c588c000d78938415ae46e0ab79959e4115d72bd (patch) | |
tree | 84250a91b6de5efc47a98268e479d9fa5ac9be55 /libre/linux-libre | |
parent | 5ff8b13e8aa3efb5c4e5ee71ec26c9d40ff79f13 (diff) | |
download | abslibre-c588c000d78938415ae46e0ab79959e4115d72bd.tar.gz abslibre-c588c000d78938415ae46e0ab79959e4115d72bd.tar.bz2 abslibre-c588c000d78938415ae46e0ab79959e4115d72bd.zip |
Update on linux-libre's PKGBUILD
Diffstat (limited to 'libre/linux-libre')
-rw-r--r-- | libre/linux-libre/PKGBUILD | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index 0d19aa86e..696a7196d 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -88,11 +88,11 @@ case "${CARCH}" in esac prepare() { - cd "${srcdir}/${_srcname}" + cd ${_srcname} # add upstream patch if [ "${_pkgbasever}" != "${_pkgver}" ]; then - patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}" + patch -p1 -i ../patch-${_pkgbasever}-${_pkgver} fi if [ "${CARCH}" = "armv7h" ]; then @@ -130,7 +130,7 @@ prepare() { # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html patch -p1 -i "${srcdir}/0002-fix-Atmel-maXTouch-touchscreen-support.patch" - cat "${srcdir}/config.${CARCH}" > ./.config + cp -Tf ../config.${CARCH} .config # append pkgrel to extraversion sed -ri "s|^(EXTRAVERSION =.*\S).*|\1-${pkgrel}|" Makefile @@ -150,11 +150,11 @@ prepare() { # ... or manually edit .config # rewrite configuration - yes "" | make config + yes "" | make config >/dev/null } build() { - cd "${srcdir}/${_srcname}" + cd ${_srcname} if [ "${CARCH}" = "armv7h" ]; then make ${MAKEFLAGS} LOCALVERSION= zImage modules dtbs @@ -174,7 +174,7 @@ _package() { backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=linux.install - cd "${srcdir}/${_srcname}" + cd ${_srcname} # get kernel version _kernver="$(make LOCALVERSION= kernelrelease)" @@ -198,37 +198,39 @@ _package() { # install mkinitcpio preset file for kernel if [ "${CARCH}" = "armv7h" ]; then sed "s|/boot/vmlinuz-%PKGBASE%|${_kernver}|g - s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" | - install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + s|%PKGBASE%|${pkgbase}|g" ../linux.preset | + install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" | - install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" fi # install pacman hook for initramfs regeneration - sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/90-linux.hook" | - install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" + sed "s|%PKGBASE%|${pkgbase}|g" ../90-linux.hook | + install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" # remove build and source links - rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} + rm "${pkgdir}"/lib/modules/${_kernver}/{source,build} + # remove the firmware - rm -rf "${pkgdir}/lib/firmware" + rm -r "${pkgdir}/lib/firmware" + # make room for external modules ln -s "../extramodules-${_basekernel}${_kernelname}" "${pkgdir}/lib/modules/${_kernver}/extramodules" + # add real version for building modules and running depmod from post_install/upgrade - mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}" - echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version" + echo "${_kernver}" | + install -Dm644 /dev/stdin "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version" # Now we call depmod... depmod -b "${pkgdir}" -F System.map "${_kernver}" # move module tree /lib -> /usr/lib - mkdir -p "${pkgdir}/usr" - mv "${pkgdir}/lib" "${pkgdir}/usr/" + mv -t "${pkgdir}/usr" "${pkgdir}/lib" if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then # add vmlinux - install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux" + install -Dm644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux" fi } |