Created
November 20, 2018 14:41
-
-
Save graysky2/422ce2aa14b310231edcfe4ee2f6b2d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/PKGBUILD 2018-11-20 07:42:48.076332191 -0500 | |
+++ b/PKGBUILD 2018-11-20 09:40:14.684141902 -0500 | |
@@ -1,10 +1,13 @@ | |
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> | |
+# Contributer: graysky <graysky AT archlinux DOT us> | |
pkgname=wireguard-module | |
-pkgver=0.0.20181018 | |
+_pkgname=WireGuard | |
+pkgver=0.0.20181119 | |
+_extramodules=extramodules-ARCH | |
pkgrel=1 | |
pkgdesc="Fast, modern, secure VPN tunnel (kernel module)" | |
-arch=('i686' 'x86_64') | |
+arch=('x86_64') | |
url="https://www.wireguard.com/" | |
license=('GPL') | |
depends=('linux>=3.10') | |
@@ -12,20 +15,18 @@ makedepends=('linux-headers>=3.10' 'xz') | |
provides=('WIREGUARD-MODULE') | |
conflicts=('WIREGUARD-MODULE') | |
source=("https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$pkgver.tar"{.xz,.asc}) | |
-sha256sums=('af05824211b27cbeeea2b8d6b76be29552c0d80bfe716471215e4e43d259e327' | |
+sha256sums=('7d47f7996dd291069de4efb3097c42f769f60dc3ac6f850a4d5705f321e4406b' | |
'SKIP') | |
validpgpkeys=('AB9942E6D4A4CFC3412620A749FC7012A5DE03AE') # Jason A. Donenfeld <Jason@zx2c4.com> | |
- | |
build() { | |
- cd "WireGuard-$pkgver/src" | |
- | |
- make module | |
+ cd "$_pkgname-$pkgver" | |
+ make -C src/ module | |
} | |
package() { | |
- cd "WireGuard-$pkgver/src" | |
- | |
- find './' -name '*.ko' -exec xz -0 --force {} \; | |
- install -Dm644 'wireguard.ko.xz' "$pkgdir/usr/lib/modules/extramodules-ARCH/wireguard.ko.xz" | |
+ cd "$_pkgname-$pkgver" | |
+ xz -0 src/wireguard.ko | |
+ install -Dm644 src/wireguard.ko.xz "$pkgdir/usr/lib/modules/$_extramodules/wireguard.ko.xz" | |
} | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Chocobo1 -
Sure: line 11 and 44 allows one to easily define the location of the kernel's extramodules whereas hard-coding it is more of a pain to edit. This makes it easier to build for custom kernels (different names) and for other architectures (like raspberry pi and other Arch ARM kernels).
For the
pkgver
var... I would keep it as you have which matches the wireguard-tools package ... since upstream is numbering commits, it's more consistent with a normal release rather than a -git release.