Skip to content

Commit

Permalink
Added AppStream metadata XML listing supported hardware.
Browse files Browse the repository at this point in the history
The AppStream metadata is package metadata shared across Linux distributions,
see https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html .
It include support for mapping to relevant hardware IDs, like USB IDs in this
case.  This allow programs like isenkram to map relevant hardware to this
package, and propose to install the package when supported hardware is available
or inserted in a computer.

This patch was originally submitted to Debian as https://bugs.debian.org/1077343 .

The patch include installation rules to install the XML file and
referred XDG desktop file.
  • Loading branch information
Petter Reinholdtsen committed Jan 15, 2025
1 parent 5d38b74 commit 1040fb8
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,7 @@ if((CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) AND NOT _isMultiConfig)
else()
message(WARNING "Document generation is only supported for in-source builds with single configuration generators.")
endif()

if(UNIX AND NOT APPLE)
install(FILES "org.gpsbabel.tool.metainfo.xml" DESTINATION share/metainfo)
endif()
5 changes: 5 additions & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,8 @@ else()
endif()
endif()
endif()

if(UNIX AND NOT APPLE)
install(FILES "gpsbabel.desktop" DESTINATION share/applications)
install(FILES "org.gpsbabel.gui.metainfo.xml" DESTINATION share/metainfo)
endif()
20 changes: 20 additions & 0 deletions gui/org.gpsbabel.gui.metainfo.xml
Original file line number Diff line number Diff line change
@@ -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-gui</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>
32 changes: 32 additions & 0 deletions org.gpsbabel.tool.metainfo.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 1040fb8

Please sign in to comment.