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.4
  10. PKG_RELEASE:=4
  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_DEPENDS:=libpcap
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  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/local/include/ndpi \
  41. $(1)/usr/include/
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) \
  44. $(PKG_INSTALL_DIR)/usr/local/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/local/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))