If it helps, this is the Makefile I’m using inside of OpenWrt. You can see the arguments I’m building with, the deps, etc…
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=suricata
PKG_VERSION:=6.0.0-beta1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-09-04
PKG_SOURCE_VERSION:=fbdc7765254983360cf2a988e78754c68e52994c
PKG_SOURCE_URL:=https://github.com/OISF/suricata.git
PKG_HASH:=skip
PKG_FIXUP:=autoreconf
PKG_FIXUP:=patch-libtool
#PKG_FIXUP:=gettext-version
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=rustup/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include ../../lang/rustup/rustc-triple.mk
define Package/suricata6
SUBMENU:=Firewall
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcre +libpcap +libnet-1.2.x +libyaml +zlib +libmagic \
+jansson +libnfnetlink +lua +liblz4 +libnss +libopenssl \
+python3 +python3-yaml +libyaml +libcap-ng +luajit +libmaxminddb \
$(ICONV_DEPENDS)
TITLE:=OISF Suricata IDS
URL:=https://www.openinfosecfoundation.org/
endef
TARGET_CFLAGS += -ggdb
CONFIGURE_VARS += \
CARGO_HOME=$(CARGO_HOME) \
RUSTUP_HOME=$(RUSTUP_HOME) \
ac_cv_path_CARGO="$(CARGO_HOME)/bin/cargo" \
ac_cv_path_RUSTC="$(CARGO_HOME)/bin/rustc"
CONFIGURE_ARGS = \
--prefix="/usr/" \
--sysconfdir="/etc" \
--enable-nfqueue \
--localstatedir="/var" \
--enable-nfqueue \
--enable-debug \
--enable-lua \
--enable-geoip \
--disable-gccmarch-native \
--with-suricata-update \
--host=$(RUSTC_TARGET_ARCH)
define Build/Prepare
$(call Build/Prepare/Default)
cd $(PKG_BUILD_DIR) && git clone https://github.com/OISF/libhtp && \
cargo install --force cbindgen
cd $(PKG_BUILD_DIR) && ./autogen.sh
endef
define Build/Compile
$(call Build/Compile/Default)
endef
define Package/suricata6/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/suricata $(1)/usr/bin/suricata
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/suricatactl $(1)/usr/bin/suricatactl
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/suricatasc $(1)/usr/bin/suricatasc
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/lib/pthon3.8
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/include/htp
$(INSTALL_DIR) $(1)/usr/share
$(INSTALL_DIR) $(1)/usr/share/suricata
$(INSTALL_DIR) $(1)/usr/share/doc
$(INSTALL_DIR) $(1)/etc/suricata
$(CP) $(PKG_BUILD_DIR)/suricata.yaml \
$(PKG_BUILD_DIR)/etc/classification.config \
$(PKG_BUILD_DIR)/threshold.config \
$(PKG_BUILD_DIR)/etc/reference.config \
$(1)/etc/suricata/
$(INSTALL_DIR) $(1)/etc/suricata/rules
$(CP) $(PKG_BUILD_DIR)/rules/*.rules $(1)/etc/suricata/rules/
$(INSTALL_DIR) $(1)/etc/init.d
# $(INSTALL_BIN) ./files/suricata.init $(1)/etc/init.d/suricata
endef
$(eval $(call BuildPackage,suricata6))