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:=1.8
  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:=6450ae256cfd7a6006d39df4a29de32f2f6fb7eb
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  17. PKG_LICENSE:=LGPLv3
  18. PKG_INSTALL:=1
  19. PKG_FIXUP:=autoreconf
  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/libndpi-1.8.0/libndpi \
  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/lib/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/bin/ndpiReader \
  58. $(1)/usr/bin/
  59. endef
  60. $(eval $(call BuildPackage,libndpi))