You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2021 Jianhui Zhao <zhaojh329@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=ovpn-dco
  10. PKG_SOURCE_DATE:=2021-10-05
  11. PKG_RELEASE:=$(AUTORELEASE)
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL=https://github.com/OpenVPN/ovpn-dco.git
  14. PKG_SOURCE_VERSION:=1017d4ada58a4c73f44ef671b6469ae168b6c6b0
  15. PKG_MIRROR_HASH:=5938ca14c7b3235b60da227f43638556272dea325ddb658bce5e0dadaebb923e
  16. PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
  17. PKG_LICENSE:=GPL-2.0-only
  18. include $(INCLUDE_DIR)/package.mk
  19. define KernelPackage/ovpn-dco
  20. SUBMENU:=Network Support
  21. TITLE:=OpenVPN data channel offload
  22. DEPENDS:=+kmod-crypto-aead +kmod-udptunnel4 +kmod-udptunnel6
  23. FILES:=$(PKG_BUILD_DIR)/drivers/net/ovpn-dco/ovpn-dco.ko
  24. AUTOLOAD:=$(call AutoLoad,30,ovpn-dco)
  25. endef
  26. define KernelPackage/ovpn-dco/description
  27. This module enhances the performance of the OpenVPN userspace software
  28. by offloading the data channel processing to kernelspace.
  29. endef
  30. NOSTDINC_FLAGS += \
  31. -I$(PKG_BUILD_DIR)/include \
  32. -include $(PKG_BUILD_DIR)/linux-compat.h
  33. EXTRA_KCONFIG:= \
  34. CONFIG_OVPN_DCO=m
  35. PKG_EXTMOD_SUBDIRS = drivers/net/ovpn-dco
  36. MAKE_OPTS:= \
  37. $(KERNEL_MAKE_FLAGS) \
  38. M="$(PKG_BUILD_DIR)/drivers/net/ovpn-dco" \
  39. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  40. $(EXTRA_KCONFIG)
  41. define Build/Compile
  42. $(MAKE) -C "$(LINUX_DIR)" \
  43. $(MAKE_OPTS) \
  44. modules
  45. endef
  46. $(eval $(call KernelPackage,ovpn-dco))