If Suricata update was bundled, use it for "install-rules" instead
of curl or wget.
install -m 770 -d "$(DESTDIR)$(e_localstatedir)"
install-rules:
+if HAVE_SURICATA_UPDATE
+ $(DESTDIR)$(bindir)/suricata-update \
+ --suricata $(DESTDIR)$(bindir)/suricata \
+ --suricata-conf $(DESTDIR)$(sysconfdir)/suricata/suricata.yaml \
+ --no-test --no-reload
+else
install -d "$(DESTDIR)$(e_sysconfrulesdir)"
if HAVE_FETCH_COMMAND
if HAVE_WGET_COMMAND
@echo "While rules are installed now, it's highly recommended to use a rule manager for maintaining rules."
@echo "The three most common are Suricata-Update, Oinkmaster and Pulledpork. For a guide see:"
@echo "https://suricata.readthedocs.io/en/latest/rule-management/index.html"
+endif
])
# suricata-update
+ have_suricata_update="no"
AC_CHECK_FILE([$srcdir/suricata-update/setup.py], [
SURICATA_UPDATE_DIR="suricata-update"
AC_SUBST(SURICATA_UPDATE_DIR)
AC_OUTPUT(suricata-update/Makefile)
+ have_suricata_update="yes"
])
+ AM_CONDITIONAL([HAVE_SURICATA_UPDATE], [test "x$have_suricata_update" != "xno"])
# libhtp
AC_ARG_ENABLE(non-bundled-htp,