diff options
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | tbdiff.morph | 10 |
2 files changed, 18 insertions, 4 deletions
@@ -4,6 +4,9 @@ CC := gcc OPT ?= -O2 +DESTDIR = / +PREFIX = /usr + DEPLOY=tbdiff-deploy CREATE=tbdiff-create @@ -34,12 +37,13 @@ ifeq (,$(findstring clean,$(MAKECMDGOALS))) endif install: $(DEPLOY) $(CREATE) - install $(CREATE) /usr/local/bin - install $(DEPLOY) /usr/local/bin + install -m 755 -d $(DESTDIR)$(PREFIX)/bin + install $(CREATE) $(DESTDIR)$(PREFIX)/bin + install $(DEPLOY) $(DESTDIR)$(PREFIX)/bin uninstall: - rm -rf /usr/local/bin/$(DEPLOY) - rm -rf /usr/local/bin/$(CREATE) + rm -rf $(DESTDIR)/$(DEPLOY) + rm -rf $(DESTDIR)/$(CREATE) test: cd tests && ./run_tests.sh && fakeroot -- ./cross_plat.sh && cd .. diff --git a/tbdiff.morph b/tbdiff.morph new file mode 100644 index 0000000..94ed111 --- /dev/null +++ b/tbdiff.morph @@ -0,0 +1,10 @@ +{ + "name": "tbdiff", + "kind": "chunk", + "build-commands": [ + "make" + ], + "install-commands": [ + "make PREFIX=\"/usr\" DESTDIR=\"$DESTDIR\" install" + ] +} |