summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo12018-07-11 14:55:08 +0800
committerChocobo12018-07-11 15:50:27 +0800
commit0853e751bec2a6266fe1af59869791fcbb2a635e (patch)
treef867388b60a8ec6b8501904022fdc126327e5dcf
downloadaur-0853e751bec2a6266fe1af59869791fcbb2a635e.tar.gz
newpkg: wireguard-module-git 0.0.20180708.r1.ge80799b
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD37
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..24019302fecc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = wireguard-module-git
+ pkgdesc = Fast, modern, secure VPN tunnel (kernel module)
+ pkgver = 0.0.20180708.r1.ge80799b
+ pkgrel = 1
+ url = https://www.wireguard.com/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = linux-headers
+ makedepends = xz
+ provides = WIREGUARD-MODULE
+ conflicts = WIREGUARD-MODULE
+ source = git+https://git.zx2c4.com/WireGuard
+ sha256sums = SKIP
+
+pkgname = wireguard-module-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d3e1f81ccceb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=wireguard-module-git
+pkgver=0.0.20180708.r1.ge80799b
+pkgrel=1
+pkgdesc="Fast, modern, secure VPN tunnel (kernel module)"
+arch=('i686' 'x86_64')
+url="https://www.wireguard.com/"
+license=('GPL')
+makedepends=('git' 'linux-headers' 'xz')
+provides=('WIREGUARD-MODULE')
+conflicts=('WIREGUARD-MODULE')
+source=("git+https://git.zx2c4.com/WireGuard")
+sha256sums=('SKIP')
+
+
+pkgver() {
+ cd "WireGuard"
+
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "WireGuard/src"
+
+ make module
+}
+
+package() {
+ cd "WireGuard/src"
+
+ _kernver=$(pacman -Q linux-headers | grep -Po '(?<= )\d+\.\d+')
+ _extramodules="/usr/lib/modules/extramodules-$_kernver-ARCH"
+
+ find './' -name '*.ko' -exec xz -0 --force {} \;
+ install -Dm644 'wireguard.ko.xz' "$pkgdir/$_extramodules/wireguard.ko.xz"
+}