void-packages/srcpkgs/clib/patches/destdir.patch

27 lines
656 B
Diff

--- Makefile.bck 2018-06-12 23:21:49.258145269 -0400
+++ Makefile 2018-06-12 23:22:23.446097218 -0400
@@ -1,5 +1,6 @@
-CC ?= cc
-PREFIX ?= /usr/local
+CC ?= cc
+DESTDIR ?= /
+PREFIX ?= /usr/local
ifdef EXE
BINS = clib.exe clib-install.exe clib-search.exe
@@ -35,11 +36,11 @@
$(RM) $(OBJS)
install: $(BINS)
- $(MKDIR) $(PREFIX)/bin
- $(foreach c, $(BINS), $(CP) $(c) $(PREFIX)/bin/$(c);)
+ $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+ $(foreach c, $(BINS), $(CP) $(c) $(DESTDIR)$(PREFIX)/bin/$(c);)
uninstall:
- $(foreach c, $(BINS), $(RM) $(PREFIX)/bin/$(c);)
+ $(foreach c, $(BINS), $(RM) $(DESTDIR)$(PREFIX)/bin/$(c);)
test:
@./test.sh