mscs/Makefile

31 lines
755 B
Makefile
Raw Normal View History

2015-03-03 19:38:46 -07:00
MSCS_USER := minecraft
MSCS_HOME := /opt/mscs
2015-08-11 09:46:21 -07:00
MSCTL := /usr/local/bin/msctl
MSCS := /usr/local/bin/mscs
MSCS_SERVICE := /etc/systemd/system/mscs.service
MSCS_COMPLETION := /etc/bash_completion.d/mscs
2013-12-02 20:39:12 -07:00
.PHONY: install update clean
2013-12-02 20:39:12 -07:00
2015-08-11 09:46:21 -07:00
install: update
2015-03-03 19:38:46 -07:00
adduser --system --group --home $(MSCS_HOME) --quiet $(MSCS_USER)
if which systemctl; then \
systemctl -f enable mscs.service; \
fi
2013-12-02 20:39:12 -07:00
update:
2015-08-11 09:46:21 -07:00
install -m 0755 msctl $(MSCTL)
install -m 0755 mscs $(MSCS)
2015-07-12 19:59:00 -07:00
install -m 0644 mscs.completion $(MSCS_COMPLETION)
if which systemctl; then \
install -m 0644 mscs.service $(MSCS_SERVICE); \
fi
2013-12-02 20:39:12 -07:00
clean:
if which systemctl; then \
systemctl -f disable mscs.service; \
rm -f $(MSCS_SERVICE); \
fi
2015-08-11 09:46:21 -07:00
rm -f $(MSCTL) $(MSCS) $(MSCS_SERVICE) $(MSCS_COMPLETION)