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.

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