summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Barrett2018-10-10 16:02:33 -0500
committerSteven Barrett2018-10-10 16:02:33 -0500
commitf21a85820c7c2c170b06981ce29e47554344dc46 (patch)
tree0b8773131ec18239412b25306db3be384c84d0ef
parent893e7b287836b1f8d46f1ee6e2d6b452e21e81a5 (diff)
downloadaur-f21a85820c7c2c170b06981ce29e47554344dc46.tar.gz
Get patch file accurately
-rw-r--r--PKGBUILD11
1 files changed, 8 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 35cf5f44e7fe..eb84bc7edf6b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -95,12 +95,17 @@ pkgver() {
prepare() {
cd ${_srcname}
- ### Add Liquorix patches
+ ### Set package version variables
_abiname="$(cat ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/defines | grep 'abiname:' | sed -r 's/abiname:\s*//')"
_minor="$(echo "$_abiname" | cut -f1 -d .)"
_patchrel="$(echo "$_abiname" | cut -f2 -d .)"
- msg2 "Patching sources with ${_lqxpatchname}-${_major}.${_minor}-${_patchrel}.patch"
- patch -Np1 -i ../${_lqxpatchver}/linux-liquorix/debian/patches/zen/v${_major}.${_minor}-lqx${_patchrel}.patch
+
+ ### Add Liquorix patches
+ local _patchrx='^zen/v\d+\.\d+\.\d+-lqx\d+.patch$'
+ local _patchfolder="${srcdir}/${_lqxpatchver}/linux-liquorix/debian/patches"
+ local _patchpath="$(grep -P "$_patchrx" "$_patchfolder/series")"
+ msg2 "Patching sources with ${_patchpath#*/}"
+ patch -Np1 -i "$_patchfolder/$_patchpath"
### Setting version
msg2 "Setting version..."