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 $< $@