Bug#840558: xawtv: Please announce supported hardware using AppStream
Control: tags -1 + patch
Here is a patch to implement this change, adjusting the appdata.xml file
and installing it, alongside the desktop file. Look like a .desktop
file used to be installed, but it was lost. Reintroducing it.
diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 0000000..71e95b8
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,36 @@
+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
+Bug-Debian: https://bugs.debian.org/1079039
+Forwarded: no
+Last-Update: 2024-08-19
+---
+Index: xawtv-salsa/contrib/xawtv.appdata.xml
+===================================================================
+--- xawtv-salsa.orig/contrib/xawtv.appdata.xml 2024-08-19 22:30:06.620847422 +0200
++++ xawtv-salsa/contrib/xawtv.appdata.xml 2024-08-19 22:36:15.248793006 +0200
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="utf-8"?>
+ <component type="desktop">
+- <id>xawtv.desktop</id>
++ <id>org.linuxtv.xawtv</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0+</project_license>
+ <name>xawtv</name>
+@@ -25,9 +25,13 @@
+ </ul>
+ </description>
+ <url type="homepage">http://linuxtv.org/wiki/index.php/Xawtv</url>
++ <launchable type="desktop-id">xawtv.desktop</launchable>
+ <screenshots>
+- <screenshot type="default">http://www.easylinux.de/Artikel/ausgabe/2004/01/036-xawtv/tv_8.png</screenshot>
+- <screenshot>http://www.easylinux.de/Artikel/ausgabe/2004/01/036-xawtv/xawtv1.png</screenshot>
++ <screenshot type="default"><image>http://www.easylinux.de/Artikel/ausgabe/2004/01/036-xawtv/tv_8.png</image></screenshot>
++ <screenshot><image>http://www.easylinux.de/Artikel/ausgabe/2004/01/036-xawtv/xawtv1.png</image></screenshot>
+ </screenshots>
+ <updatecontact>jwrdegoede_at_fedoraproject.org</updatecontact>
++ <provides>
++ <modalias>pci:v*d*sv*sd*bc04sc00i*</modalias>
++ </provides>
+ </component>
diff --git a/debian/patches/series b/debian/patches/series
index bbb7991..15eddd9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ mayhem_rootv.diff
0008-Makefile.in-honour-CPPFLAGS.patch
CVE-2020-13696-error_message_fix.patch
0001-Replace-sys_siglist-with-strsignal.patch
+1000-appstream-metainfo.patch
diff --git a/debian/rules b/debian/rules
index 259888a..764f238 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,3 +11,7 @@ override_dh_fixperms:
override_dh_installdocs:
dh_installdocs -XREADME.xfree4
+override_dh_install:
+ dh_install
+ mv debian/xawtv/usr/share/metainfo/xawtv.appdata.xml \
+ debian/xawtv/usr/share/metainfo/org.linuxtv.xawtv.metainfo.xml
diff --git a/debian/xawtv.install b/debian/xawtv.install
index e430ea1..1e465fb 100644
--- a/debian/xawtv.install
+++ b/debian/xawtv.install
@@ -1,4 +1,6 @@
contrib/xawtv*.xpm usr/share/pixmaps
+contrib/xawtv.desktop usr/share/applications
+contrib/xawtv.appdata.xml usr/share/metainfo
debian/tmp/etc/X11/app-defaults/Xawtv
debian/tmp/etc/X11/app-defaults/mtt
debian/tmp/usr/bin/mtt
--
Happy hacking
Petter Reinholdtsen
Reply to: