Package: xserver-xorg-video-qxl
Version: 0.1.5+git20200331-3
Tags: patch
User: p...@hungry.com
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
hardware is discovered.

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

  appstreamcli validate-tree  --no-net --explain debian/xserver-xorg-video-qxl

For some reason, the install rules in Makefile.am did not take effect, I
suspect the autorebuild setup in debian/rules, so I added a install rule
in debian/xserver-xorg-video-qxl.install to work around this.  I believe
this can be removed if automake is used during build.

diff --git a/debian/patches/1000-appstream-metainfo.patch 
b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 0000000..59fe71a
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,45 @@
+Description: Added AppStream metainfo XML with hardware provide info.
+ This allow isenkram to propose this package when the hardware is present.
+Author: Petter Reinholdtsen
+Forwarded: no
+Last-Update: 2024-08-04
+---
+Index: xserver-xorg-video-qxl-0.1.6/Makefile.am
+===================================================================
+--- xserver-xorg-video-qxl-0.1.6.orig/Makefile.am      2024-08-04 
08:11:30.836131812 +0200
++++ xserver-xorg-video-qxl-0.1.6/Makefile.am   2024-08-04 08:11:30.832131775 
+0200
+@@ -33,6 +33,10 @@
+ 
+ EXTRA_DIST = \
+       README.md               \
+-      README.xspice
++      README.xspice           \
++        org.spice_space.xorg.video.qxl.metainfo.xml
++
++dist_metainfo_DATA = org.spice_space.xorg.video.qxl.metainfo.xml
++metainfodir = $(datarootdir)/metainfo
+ 
+ DISTCHECK_CONFIGURE_FLAGS=--enable-xspice
+Index: xserver-xorg-video-qxl-0.1.6/org.spice_space.xorg.video.qxl.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ xserver-xorg-video-qxl-0.1.6/org.spice_space.xorg.video.qxl.metainfo.xml   
2024-08-04 08:12:44.164804246 +0200
+@@ -0,0 +1,18 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component>
++  <id>org.spice_space.xorg.video.qxl</id>
++  <metadata_license>MIT</metadata_license>
++  <name>xserver-xorg-video-qxl</name>
++  <summary>X.Org X server -- QXL display driver</summary>
++  <description>
++    <p>This package provides the driver for QXL video device, i.e. if
++    Linux is running inside a RedHat Enterprise Virtualization (RHEV)
++    environment, or other SPICE-compatible KVM/Qemu emulator.</p>
++    <p>This package is built from the X.org xf86-video-qxl driver
++    module.</p>
++  </description>
++  <url type="homepage">https://www.spice-space.org/</url>
++  <provides>
++    <modalias>pci:v00001B36d00000100sv*</modalias>
++  </provides>
++</component>
diff --git a/debian/patches/series b/debian/patches/series
index 151ff26..3ae1fb1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 python3.diff
+1000-appstream-metainfo.patch
diff --git a/debian/xserver-xorg-video-qxl.install 
b/debian/xserver-xorg-video-qxl.install
index 1254e24..39345d7 100644
--- a/debian/xserver-xorg-video-qxl.install
+++ b/debian/xserver-xorg-video-qxl.install
@@ -1 +1,2 @@
 usr/lib/xorg/modules/drivers/qxl_drv.so
+org.spice_space.xorg.video.qxl.metainfo.xml usr/share/metainfo

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to