Blob Blame History Raw
From 3b55430a83dd521dbc7633b3416c2cb54849f243 Mon Sep 17 00:00:00 2001
From: dghart <dghart@users.sourceforge.net>
Date: Thu, 18 Dec 2014 12:06:26 +0000
Subject: [PATCH 3/4] Add an appdata file: see
 https://sourceforge.net/p/fourpane/feature-requests/10/

---
 .build/4Pane.bkl  | 15 ++++++++++++---
 4Pane.appdata.xml | 28 ++++++++++++++++++++++++++++
 Makefile.in       |  4 ++++
 3 files changed, 44 insertions(+), 3 deletions(-)
 create mode 100644 4Pane.appdata.xml

diff --git a/.build/4Pane.bkl b/.build/4Pane.bkl
index 6ec38d9..8b184da 100755
--- a/.build/4Pane.bkl
+++ b/.build/4Pane.bkl
@@ -153,6 +153,12 @@
 								ln -fs 4Pane $(DESTDIR)$(BINDIR)/4pane ;\
 							fi;
 				</command>
+		<!-- 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/ ;\
+							fi;
+				</command>
     <!-- Since 2009, .desktops without exec permissions are considered insecure, so chmod it too -->
 				<command>
 							@if test $(desktop) = yes || test $(desktop) = install_only ; then \
@@ -164,18 +170,21 @@
 				</command>
 				</modify-target>
 
-		<!-- Extend "uninstall" to delete the symlink and desktop shortcut -->
+		<!-- Extend "uninstall" to delete the symlink, desktop shortcut and 4Pane.appdata.xml -->
 				<modify-target target="uninstall">
   					<command>
 										@if test $(symlink) = yes || test $(symlink) = uninstall_only; then \
 												rm -f $(DESTDIR)$(BINDIR)/4pane ;\
 										fi;
-							</command>
+						</command>
+  					<command>
+                    @rm -f /usr/share/appdata/4Pane.appdata.xml ;
+            </command>
   					<command>
 										@if test $(desktop) = yes || test $(desktop) = uninstall_only; then \
 												rm -f ~/Desktop/4Pane.desktop ;\
 										fi;				
-							</command>
+						</command>
 				</modify-target>
     </my_exe>
 
diff --git a/4Pane.appdata.xml b/4Pane.appdata.xml
new file mode 100644
index 0000000..918ecf5
--- /dev/null
+++ b/4Pane.appdata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 David Hart <david@4Pane.co.uk> -->
+<component type="desktop">
+ <id>4Pane.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-3.0</project_license>
+ <name>4Pane</name>
+ <summary>File manager</summary>
+ <description>
+  <p>
+   4Pane is a highly configurable Linux filemanager. It has dual twin-panes,
+   each of which has a directory tree-view pane and a detailed-list pane for
+   files.
+  </p>
+  <p>
+   In addition to standard file manager things, it offers multiple undo and redo
+    of most operations (including deletions), archive management including 
+    'virtual browsing' inside archives, multiple renaming/duplication of files,
+    a terminal emulator and user-defined tools.
+  </p>
+ </description>
+ <screenshots>
+  <screenshot type="default">
+   <image>http://www.4Pane.co.uk/4Pane624x351.png</image>
+  </screenshot>
+ </screenshots>
+ <url type="homepage">http://www.4pane.co.uk</url>
+</component>
diff --git a/Makefile.in b/Makefile.in
index 7a7b8b2..19ae920 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -106,6 +106,9 @@ install: install_4Pane
 	@if test $(symlink) = yes || test $(symlink) = install_only ; then \
 	ln -fs 4Pane $(DESTDIR)$(bindir)/4pane ;\
 	fi;
+	@if test -d /usr/share/appdata/ ; then \
+	cp  $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\
+	fi;
 	@if test $(desktop) = yes || test $(desktop) = install_only ; then \
 	if test -d ~/Desktop/ ; then \
 	cp -up rc/4Pane.desktop ~/Desktop/4Pane.desktop ;\
@@ -142,6 +145,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 ;
 	@if test $(desktop) = yes || test $(desktop) = uninstall_only; then \
 	rm -f ~/Desktop/4Pane.desktop ;\
 	fi;
-- 
2.1.0