On Thu, 13 Mar 2025 10:30:19 +0100, Benjamin Gaignard wrote: > Add Dpackag. for drm_info which is a small utility to dump > info about DRM devices.
Thanks for the patch! > > Signed-off-by: Benjamin Gaignard <[email protected]> > --- > rules/drm_info.in | 10 ++++++++++ > rules/drm_info.make | 32 ++++++++++++++++++++++++++++++++ > 2 files changed, 42 insertions(+) > create mode 100644 rules/drm_info.in > create mode 100644 rules/drm_info.make > > diff --git a/rules/drm_info.in b/rules/drm_info.in > new file mode 100644 > index 000000000..7346ec57e > --- /dev/null > +++ b/rules/drm_info.in > @@ -0,0 +1,10 @@ > +## SECTION=multimedia_libs Use multimedia_tools instead of multimedia_libs. > + > +menuconfig DRM_INFO > + tristate > + prompt "drm-info" > + select HOST_MESON select HOST_SYSTEM_PYTHON3 The meson.build calls the fourcc.py script during the build to generate the tables.c file. This needs python3 on the host system. > + select LIBDRM > + select JSON_C > + help > + Small utility to dump info about DRM devices. > diff --git a/rules/drm_info.make b/rules/drm_info.make > new file mode 100644 > index 000000000..d85242708 > --- /dev/null > +++ b/rules/drm_info.make > @@ -0,0 +1,32 @@ > + > +PACKAGES-$(PTXCONF_DRM_INFO) += drm_info Please add the copyright header. If you are using `ptxdist newpackage` to generate the new rule from the template, ptxdist will automatically add the header. > + > +DRM_INFO_VERSION := v2.7.0 Remove the "v". Using the version number without the v-prefix is more common in PTXdist. > +DRM_INFO_MD5 := 0066f5d02007b712d7b21a89e89785ba > +DRM_INFO := drm_info-$(DRM_INFO_VERSION) > +DRM_INFO_SUFFIX := tar.bz2 > +DRM_INFO_URL := > https://gitlab.freedesktop.org/emersion/drm_info/-/archive/$(DRM_INFO_VERSION)/$(DRM_INFO_VERSION).$(DRM_INFO_SUFFIX) > +DRM_INFO_SOURCE := $(SRCDIR)/$(DRM_INFO).$(DRM_INFO_SUFFIX) > +DRM_INFO_DIR := $(BUILDDIR)/$(DRM_INFO) > +DRM_INFO_LICENSE := MIT Add DRM_INFO_LICENSE_FILES with the license file and md5 sum from the downloaded package. > + > +DRM_INFO_CONF_TOOL := meson > +DRM_INFO_OPT := $(CROSS_MESON_USR) DRM_INFO_OPT should be DRM_INFO_CONF_OPT. Also add the -Dlibpci=no and -Dman-pages=no options as reported by the configure_helper.py script. > + > +$(STATEDIR)/drm_info.install: > + @$(call targetinfo) > + @$(call world/install, DRM_INFO) > + > + @install -D -m644 $(DRM_INFO_DIR)-build/drm_info \ > + $(DRM_INFO_PKGDIR)/drm_info > + > + @$(call touch) Drop the install stage. The drm_info binary is already correctly installed into the PKGDIR by meson. > + > +$(STATEDIR)/drm_info.targetinstall: > + @$(call targetinfo) The header of the targetinstall stage is missing. It is generated by ptxdist newpackage and should be kept as information for the IPGK. Michael > + > + @$(call install_init, drm_info) > + @$(call install_copy, drm_info, 0, 0, 0755, -, /usr/bin/drm_info) > + @$(call install_finish, drm_info) > + > + @$(call touch) > -- > 2.43.0
