1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00
openmptcprouter-feeds/ndpi-netfilter2/Makefile

79 lines
2.5 KiB
Makefile
Raw Normal View History

2018-06-22 08:50:17 +00:00
#
# Based on package from https://github.com/openwrt-develop/ndpi-netfilter/
2019-01-03 14:56:11 +00:00
# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
2018-06-22 08:50:17 +00:00
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ndpi-netfilter2
2019-09-04 10:33:14 +00:00
#PKG_VERSION:=56d8788
PKG_VERSION:=b353209
2019-05-02 19:58:05 +00:00
PKG_RELEASE:=2
2019-09-04 10:33:14 +00:00
#PKG_REV:=56d8788
PKG_REV:=b353209
2018-06-22 08:50:17 +00:00
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/
2019-04-24 19:47:00 +00:00
# DEPENDS:=+iptables +iptables-mod-conntrack-extra +kmod-ipt-ndpi +libpcap
DEPENDS:=+iptables +kmod-ipt-ndpi +libpcap
2018-10-20 07:08:49 +00:00
MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
2018-06-22 08:50:17 +00:00
endef
define Package/iptables-mod-ndpi/description
nDPI is a ntop-maintained superset of the popular OpenDPI library
endef
2018-10-20 07:08:49 +00:00
CONFIGURE_CMD = ./autogen.sh
2018-06-22 08:50:17 +00:00
CONFIGURE_ARGS += --with-pic
MAKE_PATH := ndpi-netfilter
MAKE_FLAGS += \
KERNEL_DIR="$(LINUX_DIR)" \
MODULES_DIR="$(TARGET_MODULES_DIR)" \
2018-06-22 15:10:16 +00:00
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
2018-06-22 08:50:17 +00:00
NDPI_PATH=$(PKG_BUILD_DIR)/ndpi-netfilter
define Build/Compile
(cd $(PKG_BUILD_DIR)/src/lib &&\
2019-09-04 05:29:50 +00:00
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 &&\
2018-06-22 08:50:17 +00:00
./ndpi_network_list_compile -o ndpi_network_list.c.inc ndpi_network_list_std.yaml ndpi_network_list_tor.yaml)
2018-06-22 15:10:16 +00:00
$(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/ndpi-netfilter
2018-06-22 08:50:17 +00:00
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
2018-10-20 07:08:49 +00:00
DEPENDS:=+kmod-nf-conntrack +kmod-nf-conntrack-netlink +kmod-ipt-compat-xtables +libpcap
2018-06-22 08:50:17 +00:00
KCONFIG:=CONFIG_NF_CONNTRACK_LABELS=y \
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=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))