]> git.ipfire.org Git - people/ms/suricata.git/blame - Makefile.am
python: put some defaults on suricata.config.defaults
[people/ms/suricata.git] / Makefile.am
CommitLineData
bab4b623
VJ
1# not a GNU package. You can remove this line, if
2# have all needed files, that a GNU package needs
3AUTOMAKE_OPTIONS = foreign 1.4
52936818 4ACLOCAL_AMFLAGS = -I m4
25804f5a 5EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
eb5dbc30 6 classification.config threshold.config \
cbcbc0f6 7 reference.config $(SURICATA_UPDATE_DIR)
a7d90162 8SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \
cbcbc0f6 9 $(SURICATA_UPDATE_DIR)
f7111f38 10
50ac3e04
EL
11CLEANFILES = stamp-h[0-9]*
12
25804f5a
EL
13install-data-am:
14 @echo "Run 'make install-conf' if you want to install initial configuration files. Or 'make install-full' to install configuration and rules";
15
c810748a
JI
16install-full:
17 $(MAKE) install
18 $(MAKE) install-conf
19 $(MAKE) install-rules
25804f5a
EL
20
21install-conf:
2b81caf7
JI
22 install -d "$(DESTDIR)$(e_sysconfdir)"
23 @test -e "$(DESTDIR)$(e_sysconfdir)/suricata.yaml" || install -m 600 "$(top_srcdir)/suricata.yaml" "$(DESTDIR)$(e_sysconfdir)"
24 @test -e "$(DESTDIR)$(e_sysconfdir)/classification.config" || install -m 600 "$(top_srcdir)/classification.config" "$(DESTDIR)$(e_sysconfdir)"
25 @test -e "$(DESTDIR)$(e_sysconfdir)/reference.config" || install -m 600 "$(top_srcdir)/reference.config" "$(DESTDIR)$(e_sysconfdir)"
26 @test -e "$(DESTDIR)$(e_sysconfdir)/threshold.config" || install -m 600 "$(top_srcdir)/threshold.config" "$(DESTDIR)$(e_sysconfdir)"
27 install -d "$(DESTDIR)$(e_logfilesdir)"
28 install -d "$(DESTDIR)$(e_logcertsdir)"
29 install -d "$(DESTDIR)$(e_rundir)"
30 install -m 770 -d "$(DESTDIR)$(e_localstatedir)"
25804f5a
EL
31
32install-rules:
2b81caf7 33 install -d "$(DESTDIR)$(e_sysconfrulesdir)"
daa9dcb7
EL
34if HAVE_FETCH_COMMAND
35if HAVE_WGET_COMMAND
8fc82408 36 $(HAVE_WGET) -qO - https://rules.emergingthreats.net/open/suricata-4.0/emerging.rules.tar.gz | tar -x -z -C "$(DESTDIR)$(e_sysconfdir)" -f -
daa9dcb7 37else
8fc82408 38 $(HAVE_CURL) -s https://rules.emergingthreats.net/open/suricata-4.0/emerging.rules.tar.gz | tar -x -z -C "$(DESTDIR)$(e_sysconfdir)" -f -
daa9dcb7
EL
39endif
40else
41 @echo "UNABLE to load ruleset wget or curl are not installed on system."
42endif
2b81caf7
JI
43 @test -e "$(DESTDIR)$(e_sysconfrulesdir)decoder-events.rules" || install -m 600 "$(top_srcdir)/rules/decoder-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
44 @test -e "$(DESTDIR)$(e_sysconfrulesdir)stream-events.rules" || install -m 600 "$(top_srcdir)/rules/stream-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
45 @test -e "$(DESTDIR)$(e_sysconfrulesdir)smtp-events.rules" || install -m 600 "$(top_srcdir)/rules/smtp-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
46 @test -e "$(DESTDIR)$(e_sysconfrulesdir)http-events.rules" || install -m 600 "$(top_srcdir)/rules/http-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
47 @test -e "$(DESTDIR)$(e_sysconfrulesdir)dns-events.rules" || install -m 600 "$(top_srcdir)/rules/dns-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
0d4b93ca 48 @test -e "$(DESTDIR)$(e_sysconfrulesdir)tls-events.rules" || install -m 600 "$(top_srcdir)/rules/tls-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
2b81caf7 49 @test -e "$(DESTDIR)$(e_sysconfrulesdir)modbus-events.rules" || install -m 600 "$(top_srcdir)/rules/modbus-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
50ad1ce3 50 @test -e "$(DESTDIR)$(e_sysconfrulesdir)app-layer-events.rules" || install -m 600 "$(top_srcdir)/rules/app-layer-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
bbaa79b8 51 @test -e "$(DESTDIR)$(e_sysconfrulesdir)dnp3-events.rules" || install -m 600 "$(top_srcdir)/rules/dnp3-events.rules" "$(DESTDIR)$(e_sysconfrulesdir)"
697e9e66 52 @echo ""
2b81caf7 53 @echo "You can now start suricata by running as root something like '$(DESTDIR)$(bindir)/suricata -c $(DESTDIR)$(e_sysconfdir)/suricata.yaml -i eth0'."
697e9e66
VJ
54 @echo ""
55 @echo "If a library like libhtp.so is not found, you can run suricata with:"
2b81caf7 56 @echo "'LD_LIBRARY_PATH="$(DESTDIR)$(prefix)/lib" "$(DESTDIR)$(bindir)/suricata" -c "$(DESTDIR)$(e_sysconfdir)/suricata.yaml" -i eth0'."
697e9e66
VJ
57 @echo ""
58 @echo "While rules are installed now, it's highly recommended to use a rule manager for maintaining rules."
2e8678a5
AH
59 @echo "The three most common are Suricata-Update, Oinkmaster and Pulledpork. For a guide see:"
60 @echo "https://suricata.readthedocs.io/en/latest/rule-management/index.html"