Package: gphoto2 Version: 2.5.28-2 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/gphoto2 diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch new file mode 100644 index 0000000..2921ff9 --- /dev/null +++ b/debian/patches/1000-appstream-metainfo.patch @@ -0,0 +1,46 @@ +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-18 +--- +Index: gphoto2-salsa/Makefile.am +=================================================================== +--- gphoto2-salsa.orig/Makefile.am 2024-08-18 22:26:00.472318804 +0200 ++++ gphoto2-salsa/Makefile.am 2024-08-18 22:26:00.464318717 +0200 +@@ -1,7 +1,11 @@ + SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging po tests + + ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 +-EXTRA_DIST = README.md ++EXTRA_DIST = README.md \ ++ com.github.gphoto.gphoto2.metainfo.xml ++ ++dist_metainfo_DATA = com.github.gphoto.gphoto2.metainfo.xml ++metainfodir = $(datarootdir)/metainfo + + README: $(srcdir)/README.md + cp $(srcdir)/README.md README +Index: gphoto2-salsa/com.github.gphoto.gphoto2.metainfo.xml +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gphoto2-salsa/com.github.gphoto.gphoto2.metainfo.xml 2024-08-18 22:26:42.560773149 +0200 +@@ -0,0 +1,17 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<component> ++ <id>com.github.gphoto.gphoto2</id> ++ <metadata_license>MIT</metadata_license> ++ <name>gphoto2</name> ++ <summary>digital camera command-line client</summary> ++ <description> ++ <p>The gphoto2 library can be used by applications to access ++ various digital camera models, via standard protocols such as USB ++ Mass Storage and PTP, or vendor-specific protocols.</p> ++ <p>This package provides the gphoto2 command-line frontend.</p> ++ </description> ++ <url type="homepage">https://github.com/gphoto/gphoto2</url> ++ <provides> ++ <modalias>usb:v04A9p30BFd*</modalias> ++ </provides> ++</component> diff --git a/debian/patches/series b/debian/patches/series index e76fd63..74d7d3e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ break_line_manpage.patch Skip-test021-because-it-walks-the-entire-filesystem.patch cast-mtime-to-long-long-to-avoid-32bit-time-issues.patch use-CDK_CONST-to-match-whatever-const-mode-cdk-was-built-.patch +1000-appstream-metainfo.patch -- Happy hacking Petter Reinholdtsen