Skip to content

Commit

Permalink
kmod-amneziawg: add new package
Browse files Browse the repository at this point in the history
Signed-off-by: Iurii Egorov <[email protected]>
  • Loading branch information
leninalive committed Mar 13, 2024
1 parent 85b634f commit 8ea75e9
Show file tree
Hide file tree
Showing 3 changed files with 897 additions and 0 deletions.
44 changes: 44 additions & 0 deletions net/kmod-amneziawg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
include $(TOPDIR)/rules.mk

include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=kmod-amneziawg
PKG_VERSION:=0.0.1
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define KernelPackage/amneziawg
SECTION:=kernel
CATEGORY:=Kernel Modules
SUBMENU:=Network Support
URL:=https://amnezia.org/
MAINTAINER:=Amnezia Admin <[email protected]>
TITLE:=AmneziaWG Kernel Module
FILES:=$(PKG_BUILD_DIR)/amneziawg.ko
DEPENDS:= \
+kmod-udptunnel4 \
+kmod-udptunnel6 \
+kmod-crypto-lib-chacha20poly1305 \
+kmod-crypto-lib-curve25519
endef

define Build/Prepare
cp -fr $(LINUX_DIR)/drivers/net/wireguard/{*.c,*.h,selftest/} $(PKG_BUILD_DIR)
mkdir -p $(PKG_BUILD_DIR)/uapi
cp -f $(LINUX_DIR)/include/uapi/linux/wireguard.h $(PKG_BUILD_DIR)/uapi/
for patch in `ls files/*`; do \
patch -d $(PKG_BUILD_DIR)/ -F3 -t -p0 -i "$$$$(pwd)/$$$${patch}"; \
done
cp -f src/Makefile $(PKG_BUILD_DIR)
endef

define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
endef

$(eval $(call KernelPackage,amneziawg))
Loading

0 comments on commit 8ea75e9

Please sign in to comment.