Skip to content

Commit

Permalink
add local install tools
Browse files Browse the repository at this point in the history
  • Loading branch information
niaow committed Feb 12, 2018
1 parent 1033e9d commit 205117d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 $< $@

0 comments on commit 205117d

Please sign in to comment.