summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Lucas2019-04-12 19:35:56 -0400
committerJean Lucas2019-04-12 19:35:56 -0400
commit878177da5d40496c77e99b01ee8a9fffdba587ef (patch)
treed9f8a8e7ff51c39eebc616d8b8df582b4f8d3f70
downloadaur-878177da5d40496c77e99b01ee8a9fffdba587ef.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD45
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5df271e26ee3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by mksrcinfo v8
+# Fri Apr 12 23:35:46 UTC 2019
+pkgbase = kpatch
+ pkgdesc = Live kernel patching
+ pkgver = 0.6.3
+ pkgrel = 1
+ url = https://github.com/dynup/kpatch
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gcc
+ depends = elfutils
+ conflicts = kpatch-git
+ source = https://github.com/dynup/kpatch/archive/f4ed9ff76997114ed838a3b964508d721f19f293.tar.gz
+ sha512sums = a51f46f4c34b1f2322a5e22349684f5c90bb5d7eb5f173d636ef649d4159ff68697773dfdb977d54506b67294bdea1ea0df6a45947c7c2e82d7f130a366269f7
+
+pkgname = kpatch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ed36adc5724c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Jean Lucas <jean@4ray.co
+
+pkgname=kpatch
+pkgver=0.6.3
+_commit=f4ed9ff76997114ed838a3b964508d721f19f293
+pkgrel=1
+pkgdesc="Live kernel patching"
+arch=(i686 x86_64)
+url=https://github.com/dynup/kpatch
+license=(GPL2)
+depends=(elfutils)
+makedepends=(gcc)
+conflicts=(kpatch-git)
+source=($url/archive/$_commit.tar.gz)
+sha512sums=('a51f46f4c34b1f2322a5e22349684f5c90bb5d7eb5f173d636ef649d4159ff68697773dfdb977d54506b67294bdea1ea0df6a45947c7c2e82d7f130a366269f7')
+
+prepare() {
+ # Fix search structure
+ sed -i 's/libexec/lib/g' kpatch-$_commit/kpatch-build/kpatch-build
+}
+
+build() {
+ cd kpatch-$_commit
+ make
+}
+
+package() {
+ cd kpatch-$_commit
+ make DESTDIR="$pkgdir" install
+
+ cd "$pkgdir"
+
+ # Remove incompatible init system file
+ rm etc/init/kpatch.conf
+ rmdir -p etc/init
+
+ cd usr
+
+ # Fix directory structure
+ mv local/* .
+ rmdir local
+ mv lib{exec/kpatch/*,/kpatch}
+ mv {s,}bin/kpatch
+ rmdir -p libexec/kpatch sbin
+}