changeset 19815:7dbb8aa43d56

Install correct freedesktop AppData file contents (bug #43279) * etc/icons/octave.appdata.xml.in: Move here from etc and add %OCTAVE_DESKTOP_FILE% substitution pattern. * etc/icons/Makefile.am (DESKTOP_FILE, VENDOR): New variables. (octave.appdata.xml): New rule. (install-data-local, uninstall-local): Install and uninstall octave.appdata.xml. (EXTRA_DIST): Include octave.appdata.xml.in in the list. (CLEANFILES): Include octave.appdata.xml in the list. * Makefile.am (EXTRA_DIST): Remove etc/octave.appdata.xml from the list.
author Mike Miller <mtmiller@ieee.org>
date Sat, 21 Feb 2015 16:37:01 -0500
parents 71770cf07c30
children 81078b0e39e8
files Makefile.am etc/icons/Makefile.am etc/icons/octave.appdata.xml.in etc/octave.appdata.xml
diffstat 4 files changed, 74 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Sat Feb 21 11:58:20 2015 -0500
+++ b/Makefile.am	Sat Feb 21 16:37:01 2015 -0500
@@ -63,7 +63,6 @@
   etc/README.gnuplot \
   etc/README.kpathsea \
   etc/gdbinit \
-  etc/octave.appdata.xml \
   run-octave.in
 
 include m4/module.mk
--- a/etc/icons/Makefile.am	Sat Feb 21 11:58:20 2015 -0500
+++ b/etc/icons/Makefile.am	Sat Feb 21 16:37:01 2015 -0500
@@ -47,7 +47,17 @@
   $(IMAGE_FILES) \
   octave-logo.ico
 
-all-local: octave.desktop $(BUILT_ICONS)
+VENDOR = www.octave.org
+
+DESKTOP_FILE = $(VENDOR)-octave.desktop
+
+all-local: octave.appdata.xml octave.desktop $(BUILT_ICONS)
+
+octave.appdata.xml: octave.appdata.xml.in Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(SED) < $< > $@-t \
+	  -e "s|%OCTAVE_DESKTOP_FILE%|${DESKTOP_FILE}|" && \
+	mv $@-t $@
 
 octave.desktop: octave.desktop.in Makefile
 	$(AM_V_GEN)rm -f $@-t $@ && \
@@ -69,7 +79,7 @@
 install-data-local:
 	-if test -n "$(DESKTOP_FILE_INSTALL)"; then \
 	  $(DESKTOP_FILE_INSTALL) --dir=$(DESTDIR)$(datadir)/applications \
-	    --vendor www.octave.org octave.desktop; \
+	    --vendor $(VENDOR) octave.desktop; \
 	fi
 	for f in $(BUILT_PNG_ICONS); do \
 	  size=`echo $$f | $(SED) -n -e "s/.*-\([0-9]\+\)\.png/\1/p"`; \
@@ -79,16 +89,19 @@
 	done
 	$(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
 	$(INSTALL_DATA) $(srcdir)/octave-logo.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/octave.svg
+	$(MKDIR_P) $(DESTDIR)$(datadir)/appdata
+	$(INSTALL_DATA) octave.appdata.xml $(DESTDIR)$(datadir)/appdata/$(VENDOR)-octave.appdata.xml
 
 uninstall-local:
 	if test -n "$(DESKTOP_FILE_INSTALL)"; then \
-	  rm -f $(DESTDIR)$(datadir)/applications/www.octave.org-octave.desktop; \
+	  rm -f $(DESTDIR)$(datadir)/applications/$(DESKTOP_FILE); \
 	fi
 	for f in $(BUILT_PNG_ICONS); do \
 	  size=`echo $$f | $(SED) -n -e "s/.*-\([0-9]\+\)\.png/\1/p"`; \
 	  rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/octave.png; \
 	done
 	rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/octave.svg
+	rm -f $(DESTDIR)$(datadir)/appdata/$(VENDOR)-octave.appdata.xml
 
 if AMCOND_HAVE_ICON_TOOLS
 else
@@ -99,9 +112,10 @@
 EXTRA_DIST = \
   $(BUILT_ICONS) \
   $(IMAGE_FILES) \
+  octave.appdata.xml.in \
   octave.desktop.in
 
-CLEANFILES = octave.desktop
+CLEANFILES = octave.appdata.xml octave.desktop
 
 MAINTAINERCLEANFILES = $(BUILT_ICONS)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/icons/octave.appdata.xml.in	Sat Feb 21 16:37:01 2015 -0500
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2013-2015 Carnë Draug
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<application>
+  <id type="desktop">%OCTAVE_DESKTOP_FILE%</id>
+  <licence>GPLv3+</licence>
+  <name>GNU Octave</name>
+  <summary>Interactive programming environment for numerical computations</summary>
+  <description>
+    <p>
+      GNU Octave is a high-level interpreted language, primarily intended for
+      numerical computations. It provides capabilities for the numerical
+      solution of linear and nonlinear problems, and for performing other
+      numerical experiments. It also provides extensive graphics capabilities
+      for data visualization and manipulation. Octave is normally used through
+      its interactive command line interface, but it can also be used to write
+      non-interactive programs. The Octave language is quite similar to
+      Matlab so that most programs are easily portable.
+    </p>
+    <p>
+      Octave has extensive tools for solving common numerical linear algebra
+      problems, finding the roots of nonlinear equations, integrating ordinary
+      functions, manipulating polynomials, and integrating ordinary
+      differential and differential-algebraic equations. It is easily
+      extensible and customizable via user-defined functions written in
+      Octave's own language, or using dynamically loaded modules written in
+      C++, C, Fortran, or other languages.
+    </p>
+  </description>
+  <screenshots>
+    <!--
+      From: http://people.freedesktop.org/~hughsient/appdata/
+      All screenshots should have a 16:9 aspect ratio, and should have
+      a width that is no smaller than 620px. Screenshots should be in PNG
+      or JPEG format. PNG is the preferred format.
+    -->
+    <screenshot type="default">http://www.gnu.org/software/octave/images/screenshot.png</screenshot>
+  </screenshots>
+  <url type="homepage">http://www.octave.org</url>
+  <updatecontact>maintainers@octave.org</updatecontact>
+  <project_group>GNU</project_group>
+</application>
--- a/etc/octave.appdata.xml	Sat Feb 21 11:58:20 2015 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright (C) 2013-2015 Carnë Draug
-
-  This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
--->
-<application>
-  <id type="desktop">octave.desktop</id>
-  <licence>GPLv3+</licence>
-  <name>GNU Octave</name>
-  <summary>Interactive programming environment for numerical computations</summary>
-  <description>
-    <p>
-      GNU Octave is a high-level interpreted language, primarily intended for
-      numerical computations. It provides capabilities for the numerical
-      solution of linear and nonlinear problems, and for performing other
-      numerical experiments. It also provides extensive graphics capabilities
-      for data visualization and manipulation. Octave is normally used through
-      its interactive command line interface, but it can also be used to write
-      non-interactive programs. The Octave language is quite similar to
-      Matlab so that most programs are easily portable.
-    </p>
-    <p>
-      Octave has extensive tools for solving common numerical linear algebra
-      problems, finding the roots of nonlinear equations, integrating ordinary
-      functions, manipulating polynomials, and integrating ordinary
-      differential and differential-algebraic equations. It is easily
-      extensible and customizable via user-defined functions written in
-      Octave's own language, or using dynamically loaded modules written in
-      C++, C, Fortran, or other languages.
-    </p>
-  </description>
-  <screenshots>
-    <!--
-      From: http://people.freedesktop.org/~hughsient/appdata/
-      All screenshots should have a 16:9 aspect ratio, and should have
-      a width that is no smaller than 620px. Screenshots should be in PNG
-      or JPEG format. PNG is the preferred format.
-    -->
-    <screenshot type="default">http://www.gnu.org/software/octave/images/screenshot.png</screenshot>
-  </screenshots>
-  <url type="homepage">http://www.octave.org</url>
-  <updatecontact>maintainers@octave.org</updatecontact>
-  <project_group>GNU</project_group>
-</application>