Source: hdmi2usb-mode-switch
Version: 0.0.1-2
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

Dear Maintainer,

your package installs files related to udev, into /lib. These
files need to be moved to /usr/lib as part of Debian's usr-merge
effort [1].

Attached you will find a patch to delegate the exact placement of
the udev files to udev.pc (using pkg-config). This should work today
in unstable and, if necessary, for bookworm. Once udev.pc in
unstable points to /usr/lib your package will benefit automatically
after a binNMU or any other upload.

The same patch can be found here as a salsa merge request:
  https://salsa.debian.org/debian/hdmi2usb-mode-switch/-/merge_requests/5

Later during the trixie cycle I expect this bug class to raise in
priority.

Per the wiki, it is advisable to upload to experimental first, and
wait a few days for the dumat tool to check your package. The same
is advisable when any structural changes are done in the trixie
cycle.

Thank you for considering,
Chris

[1] https://wiki.debian.org/UsrMerge
>From 3db4b39be2f0a87be6da906d0513c43e7c8d4c0b Mon Sep 17 00:00:00 2001
From: Chris Hofstaedtler <z...@debian.org>
Date: Fri, 8 Dec 2023 11:12:32 +0100
Subject: [PATCH] Use pkg-config to determine install path for udev files

---
 debian/control               | 4 +++-
 debian/hdmi2usb-udev.install | 2 +-
 debian/rules                 | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 38bd873..aa57ad5 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,9 @@ Build-Depends:
  dh-exec,
  dh-python,
  python3,
- python3-setuptools
+ python3-setuptools,
+ pkgconf,
+ systemd-dev
 Standards-Version: 4.1.3
 Homepage: https://hdmi2usb.tv/
 Vcs-Git: https://salsa.debian.org/debian/hdmi2usb-mode-switch.git
diff --git a/debian/hdmi2usb-udev.install b/debian/hdmi2usb-udev.install
index d7d437e..d63198d 100755
--- a/debian/hdmi2usb-udev.install
+++ b/debian/hdmi2usb-udev.install
@@ -1,4 +1,4 @@
 #!/usr/bin/dh-exec
 
-udev/hdmi2usb-human-path-helper.sh => /lib/udev/hdmi2usb-human-path-helper
+udev/hdmi2usb-human-path-helper.sh => /${deb_udevdir}/hdmi2usb-human-path-helper
 debian/hdmi2usb-udev.metainfo.xml /usr/share/metainfo/
diff --git a/debian/rules b/debian/rules
index b2d18af..1fa8b85 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,13 +4,15 @@ export PYBUILD_DESTDIR=debian/hdmi2usb-mode-switch
 export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/hdmi2usb-mode-switch/ \
                             --install-scripts=/usr/share/hdmi2usb-mode-switch/
 
+export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)
+
 %:
 	dh $@ --with python3 --buildsystem=pybuild
 
 override_dh_auto_install:
 	dh_auto_install
 	# udev rules
-	sed -e's#/etc/udev/rules.d/hdmi2usb-human-path-helper.sh#/lib/udev/hdmi2usb-human-path-helper#' \
+	sed -e's#/etc/udev/rules.d/hdmi2usb-human-path-helper.sh#/'$(deb_udevdir)'/hdmi2usb-human-path-helper#' \
 		$(sort $(wildcard udev/*.rules)) > debian/hdmi2usb-udev.udev
 
 override_dh_auto_test:
-- 
2.39.2

Reply via email to