mirror of
https://github.com/limosek/zaf.git
synced 2024-11-21 09:59:07 +01:00
Added tgz package support
This commit is contained in:
parent
8b81fea72c
commit
6913033874
4
Makefile
4
Makefile
@ -12,6 +12,7 @@ include deb.mk
|
||||
include arch.mk
|
||||
include ipk.mk
|
||||
include rpm.mk
|
||||
include tgz.mk
|
||||
|
||||
CONTROLFILES=$(foreach p,$(PLUGINS),$(p)/control.zaf)
|
||||
ZAF_EXPORT_OPTS=$(foreach o,$(ZAF_OPTIONS),$(shell echo $(o)|cut -d '=' -f 1))
|
||||
@ -35,6 +36,9 @@ rpm: $(RPM_PKG)
|
||||
|
||||
ipk: $(IPK_PKG)
|
||||
|
||||
tar: tgz
|
||||
tgz: $(TGZ_PKG)
|
||||
|
||||
clean:
|
||||
@rm -rf tmp/* out/*
|
||||
|
||||
|
32
tgz.mk
Normal file
32
tgz.mk
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user