b1ec6b3ce4c8ba1acc4ad2ae463caa0826c1d72f
[ossec-hids.git] /
1 Index: ossec-hids-2.8.2/Makefile
2 ===================================================================
3 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
4 +++ ossec-hids-2.8.2/Makefile   2015-08-10 04:36:27.819134760 +0000
5 @@ -0,0 +1,72 @@
6 +#
7 +# Santiago Bassett <santiago.bassett@gmail.com>
8 +# 06/15/2015
9 +#
10 +
11 +DESTDIR?=/
12 +DIR=$(DESTDIR)/var/ossec/
13 +OSSEC_INIT=$(DIR)/etc/ossec-init.conf
14 +
15 +all:
16 +       echo "HEXTRA=-DMAX_AGENTS=16384" >> src/Config.OS
17 +       (cd src; make all; make build)
18 +
19 +clean:
20 +       rm bin/* || /bin/true
21 +       mkdir -p $(DIR)/rules/translated/
22 +       chmod 750 $(DIR) || /bin/true
23 +       chmod 750 $(DIR)/* || /bin/true
24 +       chmod 750 $(DIR)/rules/translated/ || /bin/true
25 +       chmod 750 $(DIR)/rules/translated/* || /bin/true
26 +       (cd src; make clean)
27 +       rm -f src/Config.OS
28 +       rm -f src/analysisd/compiled_rules/compiled_rules.h
29 +       rm -f src/isbigendian.c
30 +       rm -f src/analysisd/ossec-makelists
31 +       rm -f src/analysisd/ossec-logtest
32 +       rm -f src/isbigendian
33 +
34 +install:
35 +       mkdir -p $(DIR)
36 +       (cd $(DIR); mkdir -p logs logs/archives logs/alerts logs/firewall bin stats rules queue queue/alerts queue/ossec queue/fts queue/syscheck queue/rootcheck queue/diff queue/agent-info queue/agentless queue/rids tmp var var/run etc etc/init.d etc/shared active-response active-response/bin agentless .ssh contrib)
37 +       cp -pr etc/rules/* $(DIR)/rules/
38 +       chmod -x $(DIR)/rules/*.xml
39 +       chmod -x $(DIR)/rules/log-entries/*
40 +       chmod -x $(DIR)/rules/translated/pure_ftpd/*.xml
41 +       cp -pL /etc/localtime $(DIR)/etc/ 2>/dev/null || /bin/true
42 +       cp -p /etc/TIMEZONE $(DIR)/etc/   2>/dev/null || /bin/true
43 +       cp -p contrib/compile_alerts.pl $(DIR)/contrib/
44 +       cp -p contrib/compile_alerts.txt $(DIR)/contrib/
45 +       cp -p contrib/config2xml $(DIR)/contrib/
46 +       cp -p contrib/ossec-batch-manager.pl $(DIR)/contrib/
47 +       cp -p contrib/ossec-eps.sh $(DIR)/contrib/
48 +       cp -pr bin/ossec* $(DIR)/bin/
49 +       cp -pr bin/manage_agents $(DIR)/bin/
50 +       cp -pr bin/syscheck_update $(DIR)/bin/
51 +       cp -pr bin/verify-agent-conf $(DIR)/bin/
52 +       cp -pr bin/clear_stats $(DIR)/bin/
53 +       cp -pr bin/list_agents $(DIR)/bin/
54 +       cp -pr bin/agent_control $(DIR)/bin/
55 +       cp -pr bin/syscheck_control $(DIR)/bin/
56 +       cp -pr bin/rootcheck_control $(DIR)/bin/
57 +       cp -pr contrib/util.sh $(DIR)/bin/
58 +       cp -pr src/init/ossec-server.sh $(DIR)/bin/ossec-control
59 +       cp -pr etc/decoder.xml $(DIR)/etc/
60 +       chmod -x $(DIR)/etc/decoder.xml
61 +       cp -pr etc/local_decoder.xml $(DIR)/etc/ > /dev/null 2>&1 || /bin/true
62 +       cp -pr etc/local_internal_options.conf $(DIR)/etc/ > /dev/null 2>&1 || /bin/true
63 +       cp -pr etc/client.keys $(DIR)/etc/ > /dev/null 2>&1 ||/bin/true
64 +       cp -pr src/agentlessd/scripts/* $(DIR)/agentless/
65 +       cp -pr etc/internal_options.conf $(DIR)/etc/
66 +       chmod -x $(DIR)/etc/internal_options.conf
67 +       cp -pr etc/ossec-server.conf $(DIR)/etc/ossec.conf
68 +       chmod -x $(DIR)/etc/ossec.conf
69 +       cp -pr src/rootcheck/db/*.txt $(DIR)/etc/shared/
70 +       chmod -x $(DIR)/etc/shared/*.txt
71 +       cp -p active-response/*.sh $(DIR)/active-response/bin/
72 +       cp -p active-response/firewalls/*.sh $(DIR)/active-response/bin/
73 +       cp -p src/init/ossec-hids-debian.init $(DIR)/etc/init.d/ossec
74 +       echo "DIRECTORY=\"/var/ossec\"" > $(OSSEC_INIT)
75 +       echo "VERSION=\"$(cat src/VERSION)" >> $(OSSEC_INIT)
76 +       echo "DATE=\"`date`\"" >> $(OSSEC_INIT)
77 +       echo "TYPE=\"server\"" >> $(OSSEC_INIT)