#1077343 gpsbabel: Add Appstream metainfo announcing HW support

Package:
gpsbabel
Source:
gpsbabel
Description:
GPS file conversion plus transfer to/from GPS units
Submitter:
Petter Reinholdtsen
Date:
2025-01-23 17:36:01 UTC
Severity:
normal
Tags:
#1077343#5
Date:
2024-07-28 16:07:08 UTC
From:
To:
Here is a patch to add Appstream metainfo XML announcing the hardware
handled by this package.

Including this information in the package will ensure programs mapping
hardware to packages using Appstream information, like the isenkram
package, will know that this package is useful on machines where the
hardware is discovered.

The appstream metadata file can be checked using this command after
package build:

  appstreamcli validate-tree  --no-net --explain debian/gpsbabel-gui

diff --git a/debian/gpsbabel-gui.install b/debian/gpsbabel-gui.install
index 5c409b202..0607a9332 100644
--- a/debian/gpsbabel-gui.install
+++ b/debian/gpsbabel-gui.install
@@ -1,3 +1,4 @@
 obj-${DEB_HOST_GNU_TYPE}/gui/GPSBabelFE/gpsbabelfe /usr/bin
 debian/gpsbabel.xpm /usr/share/pixmaps
 gui/gpsbabel.desktop /usr/share/applications
+org.gpsbabel.gui.metainfo.xml usr/share/metainfo
diff --git a/debian/gpsbabel.install b/debian/gpsbabel.install
index 5514aa062..e51dbb397 100644
--- a/debian/gpsbabel.install
+++ b/debian/gpsbabel.install
@@ -1 +1,2 @@
 obj-${DEB_HOST_GNU_TYPE}/gpsbabel usr/bin
+org.gpsbabel.tool.metainfo.xml usr/share/metainfo
diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 000000000..67c1d24f3
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,69 @@
+Description: Added AppStream metainfo XML with hardware provide info.
+ This allow isenkram to propose this package when relevant hardware is
+ present.
+Author: Petter Reinholdtsen
+Forwarded: no
+Last-Update: 2024-07-28
+---
+Index: gpsbabel-salsa/org.gpsbabel.tool.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gpsbabel-salsa/org.gpsbabel.tool.metainfo.xml      2024-07-28 12:32:52.279818146 +0200
+@@ -0,0 +1,32 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component>
++  <id>org.gpsbabel.tool</id>
++  <metadata_license>MIT</metadata_license>
++  <name>gpsbabel</name>
++  <summary>GPS file conversion plus transfer to/from GPS units</summary>
++  <description>
++    <p>GPSBabel converts waypoints, tracks, and routes from one format
++    to another, whether that format is a common mapping format like
++    Delorme, Streets and Trips, or even a serial upload or download to
++    a GPS unit such as those from Garmin and Magellan.</p>
++
++    <p>GPSBabel supports dozens of data formats and will be useful for
++    tasks such as geocaching, mapping, and converting from one GPS
++    unit to another.  Among the interesting formats it supports are
++    several GPS devices via a serial link, various PDA-based mapping
++    programs, and various Geocaching data formats.</p>
++
++    <p>Among others GPSBabel supports the following formats:</p>
++
++    <p>CSV, Custom CSV DNA, EasyGPS Binary, Fugawi, Garmin serial,
++    Geocaching.com loc, GPSDrive, GPX, Holux, IGC, Magellan serial,
++    Magellan SD, Mapopolis.Com Mapconverter, Mapsource, Maptech,
++    Microsoft Streets and Trips, NIMA/GNIS Geographic Names, NMEA
++    sentences, OziExplorer, Tab-separated data, Topo by National
++    Geographic, xcsv</p>
++  </description>
++  <url type="homepage">https://www.gpsbabel.org/</url>
++  <provides>
++    <modalias>usb:v091Ep0003d*</modalias>
++  </provides>
++</component>
+Index: gpsbabel-salsa/org.gpsbabel.gui.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ gpsbabel-salsa/org.gpsbabel.gui.metainfo.xml       2024-07-28 12:34:44.073085116 +0200
+@@ -0,0 +1,20 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component type="desktop">
++  <id>org.gpsbabel.gui</id>
++  <metadata_license>MIT</metadata_license>
++  <name>gpsbabel</name>
++  <summary>GPS file conversion plus transfer to/from GPS units</summary>
++  <description>
++    <p>GPSBabel converts waypoints, tracks, and routes from one format
++    to another, whether that format is a common mapping format like
++    Delorme, Streets and Trips, or even a serial upload or download to
++    a GPS unit such as those from Garmin and Magellan.</p>
++    <p>This package contains gpsbabelfe, a QT based frontend for
++    gpsbabel.</p>
++  </description>
++  <url type="homepage">https://www.gpsbabel.org/</url>
++  <launchable type="desktop-id">gpsbabel.desktop</launchable>
++  <provides>
++    <modalias>usb:v091Ep0003d*</modalias>
++  </provides>
++</component>
diff --git a/debian/patches/series b/debian/patches/series
index 208ecf85c..af97e4fc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ Disable-donation-nagging
 0007-Add-workaround-for-failing-test-on-i386.patch
 0009-Ignore-errors-during-lconvert.patch
 0008-Ignore-test-failures-due-to-CPU-differences.patch
+1000-appstream-metainfo.patch

#1077343#10
Date:
2024-07-28 17:56:13 UTC
From:
To:
Hi Petter,

this sounds like upstream should maintain it so could you please send it
to them, if you did not already?

Also gpsbabel supports a lot of hardware devices so the list should
probably be longer.

Cheers Jochen

* Petter Reinholdtsen <pere@hungry.com> [2024-07-28 18:07]:

#1077343#15
Date:
2024-07-28 18:06:55 UTC
From:
To:
[Jochen Sprickerhof]

I agree that upstream is probably a good actor to maintain this, and
perhaps even know better than me which hardware should be listed.  I did
not send it to upstream, and is unlikely to give it priority before I am
done submitting patches to Debian for the remaining 40 packages I need
to go through with appstream modalias provide fixes.

#1077343#20
Date:
2025-01-15 18:05:26 UTC
From:
To:
I've send a slightly modified patch upstream.
#1077343#27
Date:
2025-01-22 19:46:52 UTC
From:
To:
[Petter Reinholdtsen]

An updated patch was applied upstream in
<URL: https://github.com/GPSBabel/gpsbabel/commit/fd37f27ea6e7253f865e3d7cf7d38010a49d17b1 >.