summaryrefslogblamecommitdiff
path: root/user/wireguard-module/APKBUILD
blob: 6543966cd93192c2401da24abfe198a4a764c55a (plain) (tree)
1
2
3
4
5
6
7
8
9

                                            

                                                             
                 
                   
        

                                     
                                 





                                                                    

                                              

                                                                          

                                    
         
                                                                                 


           
                                                                                                                     

 



                                                    
                                                 
                                                                                                                  


                                                                                                                                                                                         
# Contributor: Luis Ressel <aranea@aixah.de>
# Maintainer: Luis Ressel <aranea@aixah.de>
# KEEP THIS IN SYNC with the other wireguard-module packages.
_kflavour=""
_kver="5.4.5-mc0"
pkgver=0.0.20191226
pkgrel=0
_pkgname="wireguard-module$_kflavour"
pkgname="$_pkgname-$_kver"
_pkgreal="wireguard-linux-compat"
pkgdesc="Kernel module for the WireGuard VPN, built for easy-kernel"
url="https://www.wireguard.com/"
arch="all"
options="!check !dbg !strip" # no test suite
license="GPL-2.0-only"
provides="$_pkgname=$pkgver"
depends="easy-kernel$_kflavour-modules-$_kver"
makedepends="easy-kernel$_kflavour-src-$_kver"
subpackages="wireguard-patch:_patch:noarch"
source="https://git.zx2c4.com/$_pkgreal/snapshot/$_pkgreal-$pkgver.tar.xz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	make -C src LDFLAGS="" KERNELDIR="/usr/src/linux-$_kver$_kflavour" module
}

package() {
	make -C src DEPMOD=true KERNELDIR="/usr/src/linux-$_kver$_kflavour" INSTALL_MOD_PATH="$pkgdir" module-install
}

_patch() {
	depends=""
	pkgdesc="Kernel patch for the WireGuard VPN"

	mkdir -p "$subpkgdir/usr/share/wireguard"
	"$builddir"/kernel-tree-scripts/create-patch.sh > "$subpkgdir/usr/share/wireguard/wireguard-$pkgver.patch"
}

sha512sums="7eba183128555ca5fd8b171179fe8ec7b9a67c618ad000bc9c5475ff74097e0e2c220a1f1dd82393fbde6dbbba5c1114bfd725e733a5f4acfbb23248538f6afb  wireguard-linux-compat-0.0.20191226.tar.xz"