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.

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