Blame SOURCES/open-iscsi-2.0.875-30-Cleanup-iscsiuio-master-Makefile-template.patch

47585c
From 16057538f6ff0209a0dfe40067d6fc7a8cadeaab Mon Sep 17 00:00:00 2001
47585c
From: Lee Duncan <lduncan@suse.com>
47585c
Date: Wed, 17 Jan 2018 14:17:13 -0800
47585c
Subject: [PATCH] Cleanup iscsiuio master Makefile template.
47585c
47585c
Make sure needed directories exist, and make
47585c
sure install/symbolic linking of target
47585c
works, even when not in root=/.
47585c
---
47585c
 iscsiuio/Makefile.am | 12 ++++++++----
47585c
 1 file changed, 8 insertions(+), 4 deletions(-)
47585c
47585c
diff --git a/iscsiuio/Makefile.am b/iscsiuio/Makefile.am
47585c
index c70103027be5..97f478fa2fe6 100644
47585c
--- a/iscsiuio/Makefile.am
47585c
+++ b/iscsiuio/Makefile.am
47585c
@@ -19,11 +19,15 @@ install-am: all-am
47585c
 
47585c
 install-man:
47585c
 	cat docs/iscsiuio.8 | GZIP=$(GZIP_ENV) gzip -c > iscsiuio.8.gz
47585c
-	$(INSTALL_PROGRAM) iscsiuio.8.gz $(mandir)/man8
47585c
+	$(INSTALL) -d $(DESTDIR)$(mandir)/man8/
47585c
+	$(INSTALL_DATA) iscsiuio.8.gz $(DESTDIR)$(mandir)/man8/
47585c
 
47585c
 install-log:
47585c
-	$(INSTALL_PROGRAM) iscsiuiolog $(logdir)
47585c
+	$(INSTALL) -d $(DESTDIR)$(logdir)/
47585c
+	$(INSTALL_DATA) iscsiuiolog $(DESTDIR)$(logdir)/
47585c
 
47585c
 install-brcm:
47585c
-	-rm -f $(sbindir)/brcm_iscsiuio
47585c
-	-ln -s $(sbindir)/iscsiuio $(sbindir)/brcm_iscsiuio
47585c
+	$(RM) $(DESTDIR)$(sbindir)/brcm_iscsiuio
47585c
+	(cd $(DESTDIR)/$(sbindir); \
47585c
+	 $(RM) brcm_iscsiuio; \
47585c
+	 $(LN_S) iscsiuio brcm_iscsiuio)
47585c
-- 
47585c
2.17.2
47585c