From fbf5b3b8adaf4274e53f35634124e1c3d2e4d328 Mon Sep 17 00:00:00 2001 From: Jan Alexander Steffens Date: Wed, 1 Aug 2018 09:20:39 +0000 Subject: [PATCH] Add a patch loop --- PKGBUILD | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index b54ce9c..450d3d0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -34,13 +34,20 @@ sha256sums=('SKIP' prepare() { cd $_srcname - # Insert patches or cherry-picks here - msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "${pkgbase#linux}" > localversion.10-pkgname echo "-$pkgrel" > localversion.20-pkgrel + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + msg2 "Applying patch $src..." + patch -Np1 < "../$src" + done + msg2 "Setting config..." cp ../config .config make olddefconfig @@ -156,7 +163,7 @@ _package-headers() { msg2 "Removing unneeded architectures..." local arch for arch in "$builddir"/arch/*/; do - [[ $arch == */x86/ ]] && continue + [[ $arch = */x86/ ]] && continue echo "Removing $(basename "$arch")" rm -r "$arch" done