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.

77 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2017 OpenWrt.org
  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. PKG_NAME:=libndpi
  9. PKG_VERSION:=2.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
  13. PKG_HASH:=efdfb68940385b18079920330528978765dc2a90c8163d10f63301bddadbf91e
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
  16. PKG_LICENSE:=LGPLv3
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  19. PKG_BUILD_DEPENDS:=libpcap
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/uclibc++.mk
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/libndpi
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=Library for deep-packet inspection
  28. URL:=https://github.com/ntop/nDPI
  29. DEPENDS:=$(CXX_DEPENDS) +libpcap +libjson-c
  30. endef
  31. define Package/libndpi/description
  32. nDPI is an open source LGPLv3 library for deep-packet inspection.
  33. Based on OpenDPI it includes ntop extensions.
  34. endef
  35. define Build/Configure
  36. ( cd $(PKG_BUILD_DIR); ./autogen.sh )
  37. $(call Build/Configure/Default)
  38. endef
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/include/
  41. $(CP) \
  42. $(PKG_INSTALL_DIR)/usr/local/include/ndpi \
  43. $(1)/usr/include/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) \
  46. $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so* \
  47. $(1)/usr/lib/
  48. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  49. $(CP) \
  50. $(PKG_INSTALL_DIR)/usr/libdata/pkgconfig/libndpi.pc \
  51. $(1)/usr/lib/pkgconfig/
  52. endef
  53. define Package/libndpi/install
  54. $(INSTALL_DIR) $(1)/usr/lib/
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so* \
  57. $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/bin/
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/local/bin/ndpiReader \
  61. $(1)/usr/bin/
  62. endef
  63. $(eval $(call BuildPackage,libndpi))