###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 4.0.6
+VER = 5.0.6
THISAPP = suricata-$(VER)
DL_FILE = $(THISAPP).tar.gz
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
+ifeq "$(BUILD_ARCH)" "armv5tel"
+ LDFLAGS += -latomic
+endif
+
###############################################################################
# Top-level Rules
###############################################################################
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = e8e9a401fef3b3ca1027c268c38c8f4b
+$(DL_FILE)_MD5 = 82d80b4b3179315bf6f5695c6437ee1f
install : $(TARGET)
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && ./configure \
+ cd $(DIR_APP) && LDFLAGS="$(LDFLAGS)" ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-gccmarch-native \
--enable-non-bundled-htp \
--enable-nfqueue \
- --disable-static
+ --disable-static \
+ --disable-python \
+ --with-libjansson-libraries=/usr/lib \
+ --with-libjansson-includes=/usr/include \
+ --disable-suricata-update \
+ --enable-rust
+
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
cd $(DIR_APP) && make install-conf
# Install IPFire related config file.
install -m 0644 $(DIR_SRC)/config/suricata/suricata.yaml /etc/suricata
+ # Remove shipped rules.
+ rm -rvf /usr/share/suricata
+
# Create emtpy rules directory.
-mkdir -p /var/lib/suricata
# to the rules directory.
mv /etc/suricata/*.config /var/lib/suricata
- # Set correct ownership for /var/lib/suricata
- chown nobody:nobody /var/lib/suricata
+ # Set correct permissions for the files.
+ chmod 644 /var/lib/suricata/*.config
+
+ # Set correct ownership for /var/lib/suricata and the
+ # contained files
+ chown -R nobody:nobody /var/lib/suricata
# Create logging directory.
-mkdir -p /var/log/suricata
+ # Set correct ownership for /var/log/suricata.
+ chown suricata:suricata /var/log/suricata
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)