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.

63 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2017 Banglang Huang
  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:=pf-ring
  10. PKG_VERSION:=7.2.0
  11. PKG_RELEASE:=1
  12. PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
  13. PKG_LICENSE:=GPL-2.0
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
  16. PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
  17. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. CONFIGURE_PATH:=kernel
  21. MAKE_PATH:=kernel
  22. define KernelPackage/pf-ring
  23. SUBMENU:=Network Support
  24. TITLE:=PF_RING Kernel driver
  25. FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
  26. AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
  27. endef
  28. define KernelPackage/pf-ring/description
  29. Kernel module for libpf-ring package
  30. endef
  31. EXTRA_CFLAGS += \
  32. -I$(PKG_BUILD_DIR)/kernel
  33. MAKE_OPTS := \
  34. ARCH="$(LINUX_KARCH)" \
  35. CROSS_COMPILE="$(TARGET_CROSS)" \
  36. SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
  37. CFLAGS="$(TARGET_CFLAGS)" \
  38. EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/include/linux
  41. $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/*.h $(1)/usr/include/linux
  42. endef
  43. define Build/Compile
  44. +$(MAKE) -C "$(LINUX_DIR)" \
  45. $(MAKE_OPTS) \
  46. modules
  47. endef
  48. $(eval $(call KernelPackage,pf-ring))