Package: mspdebug
Version: 0.22-2
Tags: patch
User: [email protected]
Usertags: appstream-modalias

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 USB
IDs are discovered.

diff --git a/debian/patches/1000-appstream-metainfo.patch 
b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 0000000..4b96f8c
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,53 @@
+Description: Added AppStream metainfo XML with hardware provide info.
+ This allow isenkram to propose this package when the USB dongle is
+ present.
+Author: Petter Reinholdtsen
+Forwarded: no
+Last-Update: 2024-07-17
+---
+Index: mspdebug-0.22/net.sourceforge.mspdebug.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ mspdebug-0.22/net.sourceforge.mspdebug.metainfo.xml        2024-07-17 
05:39:58.664395678 +0200
+@@ -0,0 +1,19 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component type="desktop">
++  <id>net.sourceforge.mspdebug</id>
++  <metadata_license>MIT</metadata_license>
++  <project_license>GPL-2.0+</project_license>
++  <name>mspdebug</name>
++  <summary>debugging tool for MSP430 microcontrollers</summary>
++  <description>
++    <p>MSPDebug is a free debugger for use with MSP430 MCUs. It
++    supports FET430UIF, eZ430, RF2500 and Olimex MSP-JTAG-TINY
++    programmers. It can be used as a proxy for gdb or as an
++    independent debugger with support for programming, disassembly and
++    reverse engineering.</p>
++  </description>
++  <url type="homepage">http://mspdebug.sourceforge.net/</url>
++  <provides>
++    <modalias>usb:v0451pF432d*</modalias>
++  </provides>
++</component>
+Index: mspdebug-0.22/Makefile
+===================================================================
+--- mspdebug-0.22.orig/Makefile        2024-07-17 05:38:17.707465082 +0200
++++ mspdebug-0.22/Makefile     2024-07-17 05:38:17.703465045 +0200
+@@ -24,6 +24,7 @@
+ BINDIR = ${PREFIX}/bin/
+ MANDIR = ${PREFIX}/share/man/man1
+ LIBDIR = ${PREFIX}/lib/
++METADATADIR = ${PREFIX}/share/metadata
+ 
+ 
+ ifdef WITHOUT_READLINE
+@@ -95,6 +96,9 @@
+       mkdir -p $(DESTDIR)$(LIBDIR)/mspdebug
+       $(INSTALL) -m 0644 ti_3410.fw.ihex \
+               $(DESTDIR)$(LIBDIR)/mspdebug/ti_3410.fw.ihex
++      mkdir -p $(DESTDIR)$(METADATADIR)
++      $(INSTALL) -m 644 net.sourceforge.mspdebug.metainfo.xml \
++              $(METADATADIR)
+ 
+ .SUFFIXES: .c .o
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..42e8b1a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+1000-appstream-metainfo.patch

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to