Blob Blame History Raw
From 1147a5bfa2283df5b98df01c6174203b801e04ea Mon Sep 17 00:00:00 2001
From: dghart <dghart@users.sourceforge.net>
Date: Fri, 19 Dec 2014 12:34:08 +0000
Subject: [PATCH 4/4] Correct the use of DESTDIR in the last commit

---
 .build/4Pane.bkl | 17 +++++++++--------
 Makefile.in      |  5 +++--
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/.build/4Pane.bkl b/.build/4Pane.bkl
index 8b184da..f018318 100755
--- a/.build/4Pane.bkl
+++ b/.build/4Pane.bkl
@@ -136,9 +136,9 @@
 		<!-- Extra compilation targets for non-system bzip2 builds -->
 		<!-- In theory this should 'ifdef' the bz targets and object. In practice it doesn't: -->
 		<!-- the if...endif follow the targets, not surround them; and the objects aren't affected at all -->
-        <fragment format="autoconf">ifneq ($(BZIP2_FLAGS),-DUSE_SYSTEM_BZIP2)</fragment>
-        <sources>$(fileList(['sdk/bzip/*.c']))</sources>
- 		    <fragment format="autoconf">endif</fragment>
+				<fragment format="autoconf">ifneq ($(BZIP2_FLAGS),-DUSE_SYSTEM_BZIP2)</fragment>
+				<sources>$(fileList(['sdk/bzip/*.c']))</sources>
+				<fragment format="autoconf">endif</fragment>
 
 		<!-- This is the altered "install to", that doesn't happen if the install_app option is 'no' or 'uninstall_only' -->
         <cond-install-to>$(BINDIR)</cond-install-to>
@@ -156,7 +156,8 @@
 		<!-- Install 4Pane.appdata.xml if the destination dir exists -->
 				<command> 
 							@if test -d /usr/share/appdata/ ; then \
-								cp  $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\
+								$(INSTALL_DIR) $(DESTDIR)/usr/share/appdata/ ;\
+								cp 4Pane.appdata.xml $(DESTDIR)/usr/share/appdata/ ;\
 							fi;
 				</command>
     <!-- Since 2009, .desktops without exec permissions are considered insecure, so chmod it too -->
@@ -177,10 +178,10 @@
 												rm -f $(DESTDIR)$(BINDIR)/4pane ;\
 										fi;
 						</command>
-  					<command>
-                    @rm -f /usr/share/appdata/4Pane.appdata.xml ;
-            </command>
-  					<command>
+						<command>
+								@rm -f $(DESTDIR)/usr/share/appdata/4Pane.appdata.xml ;
+						</command>
+						<command>
 										@if test $(desktop) = yes || test $(desktop) = uninstall_only; then \
 												rm -f ~/Desktop/4Pane.desktop ;\
 										fi;				
diff --git a/Makefile.in b/Makefile.in
index 19ae920..c11e531 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -107,7 +107,8 @@ install: install_4Pane
 	ln -fs 4Pane $(DESTDIR)$(bindir)/4pane ;\
 	fi;
 	@if test -d /usr/share/appdata/ ; then \
-	cp  $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\
+	$(INSTALL_DIR) $(DESTDIR)/usr/share/appdata/ ;\
+	cp 4Pane.appdata.xml $(DESTDIR)/usr/share/appdata/ ;\
 	fi;
 	@if test $(desktop) = yes || test $(desktop) = install_only ; then \
 	if test -d ~/Desktop/ ; then \
@@ -145,7 +146,7 @@ uninstall: uninstall_4Pane
 	@if test $(symlink) = yes || test $(symlink) = uninstall_only; then \
 	rm -f $(DESTDIR)$(bindir)/4pane ;\
 	fi;
-	@rm -f /usr/share/appdata/4Pane.appdata.xml ;
+	@rm -f $(DESTDIR)/usr/share/appdata/4Pane.appdata.xml ;
 	@if test $(desktop) = yes || test $(desktop) = uninstall_only; then \
 	rm -f ~/Desktop/4Pane.desktop ;\
 	fi;
-- 
2.1.0