-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtgz.mk
32 lines (25 loc) · 923 Bytes
/
tgz.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TGZ_DIR=tmp/tgz
ifeq ($(TGZ_PKG),)
TGZ_PKG=$(shell . lib/zaf.lib.sh; echo out/zaf-$$ZAF_VERSION.tgz)
endif
$(TGZ_PKG): clean tgz-init tgz-deps tgz-control tgz-scripts tgz-cp tgz-package
tgz-init:
@mkdir -p $(TGZ_DIR)
tgz-deps:
tgz-control:
tgz-scripts:
tgz-cp:
@mkdir -p $(TGZ_DIR)
@set -e; INSTALL_PREFIX=$(TGZ_DIR) ZAF_tgzUG=$(ZAF_tgzUG) ./install.sh auto $(ZAF_OPTIONS) ZAF_PLUGINS="$(ZAF_PLUGINS)" $(AGENT_OPTIONS)
@cat lib/*lib.sh install.sh >$(TGZ_DIR)/usr/lib/zaf/install.sh
@chmod +x $(TGZ_DIR)/usr/lib/zaf/install.sh
@rm -rf $(TGZ_DIR)/tmp
@cp $(TGZ_DIR)/etc/zaf.conf tmp/zaf.conf
@grep -E "$$(echo $(ZAF_EXPORT_OPTS) | tr ' ' '|')=" tmp/zaf.conf >$(TGZ_DIR)/etc/zaf.conf
ifneq ($(AGENT_OPTIONS),)
@echo "ZAF_AGENT_OPTIONS=\"$(AGENT_OPTIONS)\"" >>$(TGZ_DIR)/etc/zaf.conf
endif
tgz-package:
@tar -czf $(TGZ_PKG) -C $(TGZ_DIR) .
@echo PLUGINS embedded: $(ZAF_PLUGINS)
@echo Result: $(TGZ_PKG)