f1159bcb7916362fcf70d4759c6409b35cd6e471
[ossec-hids.git] /
1 Index: ossec-hids-agent-2.8.2/Makefile
2 ===================================================================
3 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
4 +++ ossec-hids-agent-2.8.2/Makefile     2015-06-15 03:15:51.083134760 +0000
5 @@ -0,0 +1,54 @@
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 +CEXTRA="-DCLIENT"
15 +all:
16 +       echo "CEXTRA=$(CEXTRA)" >> src/Config.OS
17 +       (cd src; make all)
18 +
19 +clean:
20 +       rm bin/* || /bin/true
21 +       chmod 750 $(DIR) || /bin/true
22 +       chmod 750 $(DIR)/* || /bin/true
23 +       (cd src; make clean)
24 +       rm -f src/Config.OS
25 +       rm -f src/analysisd/compiled_rules/compiled_rules.h
26 +       rm -f src/isbigendian.c
27 +       rm -f src/analysisd/ossec-makelists
28 +       rm -f src/analysisd/ossec-logtest
29 +       rm -f src/isbigendian
30 +
31 +install:
32 +       mkdir -p $(DIR)
33 +       (cd $(DIR); mkdir -p logs bin queue queue/ossec queue/alerts queue/syscheck queue/diff queue/rids)
34 +       (cd $(DIR); mkdir -p var var/run etc etc/init.d etc/shared active-response active-response/bin agentless .ssh)
35 +       cp -pr src/rootcheck/db/*.txt $(DIR)/etc/shared/
36 +       chmod -x $(DIR)/etc/shared/*.txt
37 +       cp -pr etc/internal_options.conf $(DIR)/etc/
38 +       chmod -x $(DIR)/etc/internal_options.conf
39 +       cp -pr etc/local_internal_options.conf $(DIR)/etc/ > /dev/null 2>&1 || /bin/true
40 +       cp -pr etc/client.keys $(DIR)/etc/ > /dev/null 2>&1 ||/bin/true
41 +       cp -pr src/agentlessd/scripts/* $(DIR)/agentless/
42 +       cp -pr src/client-agent/ossec-agentd ${DIR}/bin/
43 +       cp -pr src/os_auth/agent-auth ${DIR}/bin/
44 +       cp -pr src/logcollector/ossec-logcollector ${DIR}/bin/
45 +       cp -pr src/syscheckd/ossec-syscheckd ${DIR}/bin/
46 +       cp -pr src/os_execd/ossec-execd ${DIR}/bin/
47 +       cp -pr src/init/ossec-client.sh ${DIR}/bin/ossec-control
48 +       cp -pr src/addagent/manage_agents ${DIR}/bin/
49 +       cp -pr contrib/util.sh ${DIR}/bin/
50 +       sh src/init/fw-check.sh execute > /dev/null
51 +       cp -pr active-response/*.sh ${DIR}/active-response/bin/
52 +       cp -pr active-response/firewalls/*.sh ${DIR}/active-response/bin/
53 +       cp -pr etc/ossec-agent.conf $(DIR)/etc/ossec.conf
54 +       chmod -x $(DIR)/etc/ossec.conf
55 +       cp -p src/init/ossec-hids-debian.init $(DIR)/etc/init.d/ossec
56 +       echo "DIRECTORY=\"/var/ossec\"" > $(OSSEC_INIT)
57 +       echo "VERSION=\"v2.8.2\"" >> $(OSSEC_INIT)
58 +       echo "DATE=\"`date`\"" >> $(OSSEC_INIT)
59 +       echo "TYPE=\"agent\"" >> $(OSSEC_INIT)