diff options
author | Scott B | 2021-09-16 17:56:37 -0700 |
---|---|---|
committer | Antoine Viallon | 2021-10-25 10:18:32 +0200 |
commit | a3c149ea5fbd9b190d093ae05a282fbf119aab11 (patch) | |
tree | 295875439c5e90675e77e2c25c5761fdb6184520 /PKGBUILD | |
parent | 499f7a307d7da92163a26350d283033016a81ce3 (diff) | |
download | aur-a3c149ea5fbd9b190d093ae05a282fbf119aab11.tar.gz |
PKGBUILD: better handle point release patches
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 33 |
1 files changed, 20 insertions, 13 deletions
@@ -203,26 +203,33 @@ export KBUILD_BUILD_TIMESTAMP=${KBUILD_BUILD_TIMESTAMP:-$(date -Ru${SOURCE_DATE_ prepare() { cd "linux-${_major}" - # Apply Xanmod patch - msg2 "Applying Xanmod patch..." - patch -Np1 -i "../patch-${xanmod}" + # WARN: mangle Makefile versions here if needed to apply patches cleanly - # WARN: mangle Makefile versions here if needed so patches apply cleanly - - ## Monkey patch: apply kernel.org patches when mainline is slightly ahead of Xanmod official - patch -Np1 -i ../patch-5.14.4-5 - - # Archlinux patches + # Apply patches local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" - [[ "$src" =~ .*(patch|diff)$ ]] || continue - msg2 "Applying patch $src..." - patch -Np1 < "../$src" + case "$src" in + patch-${_major}*xanmod*xz) + # Apply Xanmod patch + msg2 "Applying Xanmod patch..." + patch -Np1 -i "../${src%\.xz}" + ;; + patch-${_major}*xz) + # Apply kernel.org point releases if we're building ahead of Xanmod official + msg2 "Applying kernel.org point release ${src%\.xz} ..." + patch -Np1 -i "../${src%\.xz}" + ;; + *patch|*diff) + # Apply any other patches + msg2 "Applying patch $src..." + patch -Np1 < "../$src" + ;; + esac done - # WARN: mangle Makefile versions if needed before calling setlocalversion + # WARN: mangle Makefile versions here if needed before calling setlocalversion msg2 "Setting version..." scripts/setlocalversion --save-scmversion |