From 205117d58d582dfa62a63dc851efdd3ff9ed7dcf Mon Sep 17 00:00:00 2001 From: Jaden Weiss Date: Sun, 11 Feb 2018 20:05:34 -0500 Subject: [PATCH] add local install tools --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2cfb1d0..bebe9bd 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,6 @@ vercmp.o: vercmp.c cc vercmp.c -o vercmp.o -ifneq ($(DESTDIR),) - install: $(DESTDIR)/usr/bin/vercmp fetchers scripts fetchers: $(DESTDIR)/etc/lpkg.d/fetchers/01_http.sh $(DESTDIR)/etc/lpkg.d/fetchers/02_https.sh @@ -24,4 +22,15 @@ $(DESTDIR)/usr/bin/lpkg-rm: rm.sh $(DESTDIR)/usr/bin/vercmp: vercmp.o install -m 0700 -D vercmp.o $(DESTDIR)/usr/bin/vercmp +ifeq ($(LOCALDIR),) +LOCALDIR = /usr/local/lpkg endif + +install-local-tools: $(LOCALDIR)/vercmp $(LOCALDIR)/lpkg-inst $(LOCALDIR)/lpkg-alt + +$(LOCALDIR)/vercmp: vercmp.o + install -m 0755 -D $< $@ +$(LOCALDIR)/lpkg-inst: inst.sh + install -m 0755 -D $< $@ +$(LOCALDIR)/lpkg-alt: alternative.sh + install -m 0755 -D $< $@