summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9e07022f0a6a6121efba42011e4ba734e3b7e43b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Rin Cat <me@rin.cat>

pkgname=wireguard-hardened
pkgver=0.0.20191012
pkgrel=4
pkgdesc='Wireguard module for Hardened Kernel'
arch=('x86_64')
url='http://www.wireguard.com/'
license=('GPL')
depends=("linux-hardened")
makedepends=('gcc' 'linux-hardened-headers')
conflicts=('wireguard-dkms')
provides=('WIREGUARD-MODULE')
validpgpkeys=('AB9942E6D4A4CFC3412620A749FC7012A5DE03AE') # Jason A. Donenfeld <Jason@zx2c4.com>
source=("https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${pkgver}.tar"{.xz,.asc})
sha256sums=('93573193c9c1c22fde31eb1729ad428ca39da77a603a3d81561a9816ccecfa8e'
            'SKIP')

build() {
    _kernver="$(cat /usr/src/linux-hardened/version)"
    cd "${srcdir}/WireGuard-${pkgver}/src/"
    make KERNELRELEASE="${_kernver}" module
}

package() {
    _kernver="$(cat /usr/src/linux-hardened/version)"
    depends=("linux-hardened=$(echo ${_kernver}|sed 's/-hardened//g')")
    cd "${srcdir}/WireGuard-${pkgver}/src/"
    xz wireguard.ko
    install -Dt "$pkgdir/usr/lib/modules/${_kernver}/extramodules/" -m0644 wireguard.ko.xz
}