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.

61 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. $(KERNEL_NOSTDINC_FLAGS) \
  32. -I$(PKG_BUILD_DIR)/include \
  33. -include $(PKG_BUILD_DIR)/linux-compat.h
  34. EXTRA_KCONFIG:= \
  35. CONFIG_OVPN_DCO=m
  36. PKG_EXTMOD_SUBDIRS = drivers/net/ovpn-dco
  37. MAKE_OPTS:= \
  38. $(KERNEL_MAKE_FLAGS) \
  39. M="$(PKG_BUILD_DIR)/drivers/net/ovpn-dco" \
  40. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  41. $(EXTRA_KCONFIG)
  42. define Build/Compile
  43. $(MAKE) -C "$(LINUX_DIR)" \
  44. $(MAKE_OPTS) \
  45. modules
  46. endef
  47. $(eval $(call KernelPackage,ovpn-dco))