[arch-commits] Commit in linux/trunk (PKGBUILD)
Jan Steffens
heftig at archlinux.org
Wed Aug 1 09:20:40 UTC 2018
Date: Wednesday, August 1, 2018 @ 09:20:39
Author: heftig
Revision: 330052
Add a patch loop
Modified:
linux/trunk/PKGBUILD
----------+
PKGBUILD | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-08-01 09:20:39 UTC (rev 330051)
+++ PKGBUILD 2018-08-01 09:20:39 UTC (rev 330052)
@@ -35,13 +35,20 @@
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
@@ -157,7 +164,7 @@
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
More information about the arch-commits
mailing list