Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow_info-3.2 makefile #4

Open
literacy0702 opened this issue Jul 9, 2020 · 0 comments
Open

flow_info-3.2 makefile #4

literacy0702 opened this issue Jul 9, 2020 · 0 comments

Comments

@literacy0702
Copy link

literacy0702 commented Jul 9, 2020

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=ndpi-netfilter
PKG_VERSION:=flow_info-6e6cdf0-3.2
PKG_RELEASE:=1
PKG_REV:=6e6cdf0

PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/vel21ripn/nDPI.git
PKG_SOURCE_VERSION:=$(PKG_REV)

PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/iptables-mod-ndpi
SUBMENU:=Firewall
SECTION:=net
CATEGORY:=Network
TITLE:=ndpi successor of OpenDPI
URL:=http://www.ntop.org/products/ndpi/
DEPENDS:=+iptables +iptables-mod-conntrack-extra +kmod-ipt-ndpi
MAINTAINER:=Thomas Heil [email protected]
endef

define Package/iptables-mod-ndpi/description
nDPI is a ntop-maintained superset of the popular OpenDPI library
endef

#CONFIGURE_CMD=./autogen.sh
CONFIGURE_ARGS += --with-pic

MAKE_PATH:=ndpi-netfilter

MAKE_FLAGS +=
KERNEL_DIR="$(LINUX_DIR)"
MODULES_DIR="$(TARGET_MODULES_DIR)"
ARCH="$(LINUX_KARCH)"
CROSS_COMPILE="$(TARGET_CROSS)"
NDPI_PATH=$(PKG_BUILD_DIR)/ndpi-netfilter

define Build/Configure
( cd $(PKG_BUILD_DIR); ./autogen.sh )
$(call Build/Configure/Default)
endef

define Build/Compile
(cd $(PKG_BUILD_DIR)/src/lib &&
gcc -g -O2 -fPIC -DPIC -DNDPI_LIB_COMPILATION -I../../src/include/ -I../../src/lib/third_party/include/ ndpi_network_list_compile.c -o ndpi_network_list_compile &&
./ndpi_network_list_compile -o ndpi_network_list.c.inc ndpi_network_list_std.yaml ndpi_network_list_tor.yaml)
make $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/ndpi-netfilter
endef

define Package/iptables-mod-ndpi/install
$(INSTALL_DIR) $(1)/usr/lib/iptables
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ndpi-netfilter/ipt/libxt_ndpi.so $(1)/usr/lib/iptables
endef

define KernelPackage/ipt-ndpi
SUBMENU:=Netfilter Extensions
TITLE:= nDPI net netfilter module
DEPENDS:=+kmod-nf-conntrack +kmod-nf-conntrack-netlink +kmod-ipt-compat-xtables +kmod-ipt-conntrack-label
KCONFIG:=CONFIG_NF_CONNTRACK_LABELS=y
FILES:=
$(PKG_BUILD_DIR)/ndpi-netfilter/src/xt_ndpi.ko
AUTOLOAD:=$(call AutoProbe,xt_ndpi)
endef

$(eval $(call BuildPackage,iptables-mod-ndpi))
$(eval $(call KernelPackage,ipt-ndpi))

mlevy94 added a commit to ViridiParente/ndpi-netfilter that referenced this issue Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant