fix build

This commit is contained in:
Vladislav Minakov 2024-10-18 22:33:57 +03:00
parent ad089de727
commit 904146bf25
2 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,7 @@
pkgbase = amneziawg-dkms
pkgdesc = AmneziaWG is a contemporary version of the popular VPN protocol, WireGuard.
pkgver = 1.0.20240711
pkgrel = 1
pkgrel = 2
url = https://github.com/amnezia-vpn/amneziawg-linux-kernel-module
arch = x86_64
license = GPLv2
@ -11,3 +11,4 @@ pkgbase = amneziawg-dkms
pkgname = amneziawg-dkms
depends = dkms
depends = wget

View File

@ -5,14 +5,21 @@ pkgdesc="AmneziaWG is a contemporary version of the popular VPN protocol, WireGu
url="https://github.com/amnezia-vpn/amneziawg-linux-kernel-module"
arch=("x86_64")
pkgver=1.0.20240711
pkgrel=1
pkgrel=2
license=('GPLv2')
provides=("AMNEZIAWG-MODULE=${pkgver}")
source=("$pkgname-$pkgver.tar.gz::https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('0499fc3c29ceaa3e57611fd86c943e57b9621aa2db31f8fdafcfe0ff0dfaf5aa07381d462d9b194c8ea206f5eb9d1160976bfc6d0fdaf112b81b87ad3d391538')
package() {
depends=("dkms")
depends=("dkms" "wget")
cat > "${srcdir}/amneziawg-linux-kernel-module-${pkgver}/kernel-tree-scripts/prepare-sources.sh" <<'EOF'
#!/bin/bash -eux
kernel="${1%%[^0-9.]*}"
kernel_major="${1%%[^0-9]*}"
wget "https://cdn.kernel.org/pub/linux/kernel/v${kernel_major}.x/linux-${kernel}.tar.xz" -O- | tar -xvJf - --wildcards linux-${kernel}/drivers/net/wireguard "linux-${kernel}/K*" linux-${kernel}/include/uapi/linux/
ln -sf linux-${kernel} kernel;
EOF
cd ${srcdir}/amneziawg-linux-kernel-module-${pkgver}/src
make DESTDIR=${pkgdir} dkms-install
}