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

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