summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 516ff8867ee2e14cbffc0c77e7d7679e7c9b1e4b (plain)
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
VERSION		?= v0.1.0
CONFIG_DIR	?= /etc/setup-box
DEPS		?= jq
JSON_DIR	?= /etc/setup-box/json
SBIN_FILES	:= setup-box
SBIN_DIR	?= /sbin
JSON_FILES	:= desktop.json \
		desktop-extras.json \
		pentest.json \
		example.json.sample
MISC_FILES	:= README \
		LICENSE

DESC="A tool to setup a variety of Alpine Linux Environmets"

install: $(SBIN_FILES)
	sed -e 's:@CONFIG_DIR@:$(CONFIG_DIR):g' -i $(SBIN_DIR)/$(SBIN_FILES)
	sed -e 's:@JSON_DIR@:$(JSON_DIR):g' -i $(SBIN_DIR)/$(SBIN_FILES)
	sed -e 's:@DEPS@:$(DEPS):g' -i $(SBIN_DIR)/$(SBIN_FILES)
	sed -e 's:@VERSION@:$(VERSION):g' -i $(SBIN_DIR)/$(SBIN_FILES)
	cp $(MISC_FILES) $(CONFIG_DIR)
	

uninstall:
	rm -f $(SBIN_DIR)/$(SBIN_FILES)
	rm -rf $(CONFIG_DIR)