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