Package: uhd-host Version: 4.3.0.0+ds1-5 Tags: patch User: p...@hungry.com Usertags: appstream-modalias
Here is a draft patch to add Appstream metainfo XML announcing the hardware handled by this package. I was unable to figure out the build system, so I could not test the patch. 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/uhd-host diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch new file mode 100644 index 0000000..d45b3fb --- /dev/null +++ b/debian/patches/1000-appstream-metainfo.patch @@ -0,0 +1,42 @@ +Description: Added AppStream metainfo XML with hardware provide info. + This allow isenkram to propose this package when the relevant hardware is + present. +Author: Petter Reinholdtsen +Forwarded: no +Last-Update: 2024-08-20 +--- +Index: uhd-4.7.0.0+ds1/com.ettus.sdr_software.uhd_usrp_hardware_driver.metainfo.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ uhd-4.7.0.0+ds1/com.ettus.sdr_software.uhd_usrp_hardware_driver.metainfo.xml 2024-08-20 10:48:17.062024834 +0200 +@@ -0,0 +1,30 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<component> ++ <id>com.ettus.sdr_software.uhd_usrp_hardware_driver</id> ++ <metadata_license>MIT</metadata_license> ++ <name>uhd-host</name> ++ <summary>universal hardware driver for Ettus Research products - host apps</summary> ++ <description> ++ <p>Host utilities for the Universal Hardware Driver for Ettus ++ Research products.</p> ++ ++ <p>The supported devices provide analog radio receiver and ++ transmitter hardware along with digital interfaces for getting ++ signals to and from a software defined radio running on the host ++ computer.</p> ++ ++ <p>This package includes the uhd_find_devices application to ++ locate and configure attached peripherals, the uhd_usrp_probe ++ application to display hardware configuration information and ++ Doxygen generated documentation.</p> ++ </description> ++ <url type="homepage">https://www.ettus.com/sdr-software/uhd-usrp-hardware-driver/</url> ++ <provides> ++ <modalias>usb:vFFFEp0002d*</modalias> ++ <modalias>usb:v2500p0002d*</modalias> ++ <modalias>usb:v2500p0020d*</modalias> ++ <modalias>usb:v2500p0021d*</modalias> ++ <modalias>usb:v3923p7813d*</modalias> ++ <modalias>usb:v3923p7814d*</modalias> ++ </provides> ++</component> The list if USB IDs are fetched from debian/uhd-host.udev. In addition to this patch, debian/patches/series need to get the line "1000-appstream-metainfo.patch" added, and debian/uhd-host.install need to get the line "com.ettus.sdr_software.uhd_usrp_hardware_driver.metainfo.xml usr/share/metainfo" added (or even better, the equivalent added to the upstream cmake setup) If there is a XDG menu entry (aka a .desktop file), a line like this should go into the XML file too: <launchable type="desktop-id">uhd-host.desktop</launchable> I could not verify this, as I was unable to build the package due to insufficient free disk space, and did not understand the build system enough to predict what is actually happening during the build. -- Happy hacking Petter Reinholdtsen