docker-vpn/Makefile

24 lines
604 B
Makefile

START_SCRIPT := start
START_SCRIPT_SRC := start.tmpl
INSTALLATION_NAME := openvpn-aria2
DOCKERFILE := Dockerfile
TAG = openvpn-aria2
build: build-docker $(START_SCRIPT)
build-docker: $(DOCKERFILE) start-openvpn.sh
docker pull alpine
docker build --tag=$(TAG) .
@echo "This is a marker for the docker build." > $@
$(START_SCRIPT): $(START_SCRIPT_SRC)
sed -e "s/{TAG}/$(TAG)/g" -e "s/{INSTALLATION_NAME}/$(INSTALLATION_NAME)/g" $< > $@
chmod +x $@
clean:
$(RM) build-docker $(START_SCRIPT)
install: build
install -D --mode=755 $(START_SCRIPT) /usr/local/bin/$(INSTALLATION_NAME)
.PHONY: clean