summaryrefslogtreecommitdiff
path: root/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch
diff options
context:
space:
mode:
authorAndrew Wilcox <AWilcox@Wilcox-Tech.com>2016-04-16 18:35:30 -0500
committerAndrew Wilcox <AWilcox@Wilcox-Tech.com>2016-04-16 18:37:40 -0500
commit2cce07628bf2ea966105afd52f73ba34088b2f5a (patch)
tree49b10dd59be8153cc781275a4378f8813268ce63 /sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch
parentaf0667fafa4be900acebeea977b4529c837f11a0 (diff)
downloadpackages-2cce07628bf2ea966105afd52f73ba34088b2f5a.tar.gz
packages-2cce07628bf2ea966105afd52f73ba34088b2f5a.tar.bz2
packages-2cce07628bf2ea966105afd52f73ba34088b2f5a.tar.xz
packages-2cce07628bf2ea966105afd52f73ba34088b2f5a.zip
sys-apps/noxcuse: New package
Diffstat (limited to 'sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch')
-rw-r--r--sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch b/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch
new file mode 100644
index 000000000..47fca9aa6
--- /dev/null
+++ b/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch
@@ -0,0 +1,44 @@
+From 29396c114765726c20ac6d1080433803f8f0dc86 Mon Sep 17 00:00:00 2001
+From: Andrew Wilcox <AWilcox@Wilcox-Tech.com>
+Date: Sat, 16 Apr 2016 15:04:48 -0500
+Subject: [PATCH 2/2] Makefile: Support DESTDIR for out-of-root installations
+
+---
+ Makefile | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 638a354..a4572ab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+
+-bindir = /bin
+-usrbindir = /usr/bin
++bindir = $(DESTDIR)/bin
++usrbindir = $(DESTDIR)/usr/bin
+
+ CFLAGS = -D_XOPEN_SOURCE=700 -Os -Wall -Wno-format -Wno-char-subscripts -Wno-unused -Wno-parentheses
+ LDFLAGS =
+@@ -20,11 +20,17 @@ clean:
+ bin/%: src/%.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+-install: $(B:%=$(bindir)/%) $(UB:%=$(usrbindir)/%)
++install: $(bindir) $(usrbindir) $(B:%=$(bindir)/%) $(UB:%=$(usrbindir)/%)
+
+ size: $(ALL)
+ size -t $(ALL)
+
++$(bindir):
++ mkdir -p $(bindir)
++
++$(usrbindir):
++ mkdir -p $(usrbindir)
++
+ $(bindir)/%: bin/%
+ install $< $(bindir)
+
+--
+2.7.4
+