From: Matthias Kruk Date: Wed, 24 Mar 2021 23:30:38 +0000 (+0900) Subject: toolbox: Add Makefile for easy installation X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=e40336b274ad64413309ee8c739ad1f0b6d5a3a8;p=toolbox toolbox: Add Makefile for easy installation This commit adds a Makefile that can be used to easily install and uninstall the toolbox. --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4681690 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +PHONY = install uninstall + +ifeq ($(PREFIX), ) + PREFIX = /usr/local +endif + +all: + +clean: + +install: + mkdir -p $(DESTDIR)/$(PREFIX)/share/toolbox + mkdir -p $(DESTDIR)/$(PREFIX)/bin + cp toolbox.sh $(DESTDIR)/$(PREFIX)/share/toolbox/. + cp -r include $(DESTDIR)/$(PREFIX)/share/toolbox/. + chown -R root.root $(DESTDIR)/$(PREFIX)/share/toolbox + find $(DESTDIR)/$(PREFIX)/share/toolbox -type d -exec chmod 755 {} \; + find $(DESTDIR)/$(PREFIX)/share/toolbox -type f -exec chmod 644 {} \; + chmod -R 755 $(DESTDIR)/$(PREFIX)/share/toolbox + ln -sf $(DESTDIR)/$(PREFIX)/share/toolbox/toolbox.sh $(DESTDIR)/$(PREFIX)/bin/toolbox.sh + +uninstall: + rm $(DESTDIR)/$(PREFIX)/bin/toolbox.sh + rm -rf $(DESTDIR)/$(PREFIX)/share/toolbox + +.PHONY: $(PHONY)