2 # Copyright (C) 2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/ntop
/nDPI
/tar.gz
/$(PKG_VERSION
)?
16 PKG_HASH
:=8f6235ba672d4ac8e4cbebb5611bc712a74587d9d53a649f483e4bcca5b80e58
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/nDPI-
$(PKG_VERSION
)
19 PKG_MAINTAINER
:=Banglang Huang
<banglang.huang@foxmail.com
>, Toni Uhlig
<matzeton@googlemail.com
>
20 PKG_LICENSE
:=LGPL-3.0
-or-later
21 PKG_LICENSE_FILES
:=COPYING
24 PKG_REMOVE_FILES
:=autogen.sh
25 PKG_BUILD_DEPENDS
:=libpcap
28 include $(INCLUDE_DIR
)/package.mk
30 ifeq ($(LIBNDPI_NDPIREADER
),)
31 CONFIGURE_ARGS
+= --with-only-libndpi
34 ifneq ($(CONFIG_LIBNDPI_GCRYPT
),)
35 CONFIGURE_ARGS
+= --with-local-libgcrypt
38 ifneq ($(CONFIG_LIBNDPI_PCRE
),)
39 CONFIGURE_ARGS
+= --with-pcre
42 ifneq ($(CONFIG_LIBNDPI_MAXMINDDB
),)
43 CONFIGURE_ARGS
+= --with-maxminddb
46 define Package
/libndpi
49 TITLE
:=Library for deep-packet inspection
50 URL
:=https
://github.com
/ntop
/nDPI
51 DEPENDS
:=+LIBNDPI_GCRYPT
:libgcrypt
+LIBNDPI_PCRE
:libpcre
+LIBNDPI_MAXMINDDB
:libmaxminddb
+LIBNDPI_NDPIREADER
:libpcap
54 define Package
/libndpi
/description
55 nDPI is an open source LGPLv3 library for deep-packet inspection.
56 Based on OpenDPI it includes ntop extensions.
59 define Package
/libndpi
/config
60 config LIBNDPI_NDPIREADER
61 bool
"Enable ndpiReader"
62 depends on PACKAGE_libndpi
65 This option builds and installs ndpiReader
,
66 an example application that show some nDPI features.
69 bool
"Use host GCrypt"
70 depends on PACKAGE_libndpi
73 This option enables the use of libgcrypt to decrypt QUIC client hello
's.
74 If disabled, nDPI will use a builtin lightweight libgcrypt version to
75 decrypt QUIC client hello's.
80 depends on PACKAGE_libndpi
83 This option enables the use of regular expressions.
84 Used by nDPI to detect RCE injection.
87 config LIBNDPI_MAXMINDDB
88 bool
"Maxmind GeoIP support"
89 depends on PACKAGE_libndpi
92 This options enables geographical information processing
93 and serialization based on IP addresses.
97 define Build
/InstallDev
98 $(INSTALL_DIR
) $(1)/usr
/include/ndpi
99 $(CP
) $(PKG_BUILD_DIR
)/src
/include/*.h \
100 $(1)/usr
/include/ndpi
/
102 $(INSTALL_DIR
) $(1)/usr
/lib
103 $(CP
) $(PKG_BUILD_DIR
)/src
/lib
/libndpi.so
* \
106 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
107 $(CP
) $(PKG_BUILD_DIR
)/libndpi.
pc \
108 $(1)/usr
/lib
/pkgconfig
/
111 define Package
/libndpi
/install
112 $(INSTALL_DIR
) $(1)/usr
/lib
/
113 $(CP
) $(PKG_BUILD_DIR
)/src
/lib
/libndpi.so
* \
115 $(INSTALL_DIR
) $(1)/usr
/bin
/
116 ifneq ($(LIBNDPI_NDPIREADER
),)
117 $(CP
) $(PKG_BUILD_DIR
)/example
/ndpiReader \
122 $(eval
$(call BuildPackage
,libndpi
))