Source: stlink
Version: 1.7.0+ds-1
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 using udev.pc to place the udev files
(using pkg-config). This works today in unstable and also for
bookworm, and is safe to do now.
Once udev.pc in unstable points to /usr/lib your package will
benefit automatically after a binNMU or any other upload.

If during the trixie cycle your package will undergo structural
changes or any other file moves, please see the wiki and upload
to experimental first when these changes are done.

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

Thank you for considering,
Chris

[1] https://wiki.debian.org/UsrMerge
diff -Nru stlink-1.7.0+ds/debian/changelog stlink-1.7.0+ds/debian/changelog
--- stlink-1.7.0+ds/debian/changelog	2021-08-15 15:23:25.000000000 +0200
+++ stlink-1.7.0+ds/debian/changelog	2023-12-16 23:11:12.000000000 +0100
@@ -1,3 +1,10 @@
+stlink (1.7.0+ds-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use udev.pc to place udev files. (Closes: #-1)
+
+ -- Chris Hofstaedtler <z...@debian.org>  Sat, 16 Dec 2023 23:11:12 +0100
+
 stlink (1.7.0+ds-1) unstable; urgency=medium
 
   * Merge tag 'v1.7.0' into debian. (Closes: #984356)
diff -Nru stlink-1.7.0+ds/debian/control stlink-1.7.0+ds/debian/control
--- stlink-1.7.0+ds/debian/control	2021-08-15 15:20:57.000000000 +0200
+++ stlink-1.7.0+ds/debian/control	2023-12-16 23:10:17.000000000 +0100
@@ -1,7 +1,7 @@
 Source: stlink
 Priority: optional
 Maintainer: Luca Boccassi <bl...@debian.org>
-Build-Depends: debhelper-compat (= 13), cmake (>= 3.4.2), libusb-1.0-0-dev, libgtk-3-dev
+Build-Depends: debhelper-compat (= 13), cmake (>= 3.4.2), libusb-1.0-0-dev, libgtk-3-dev, pkgconf, systemd-dev
 Standards-Version: 4.5.1
 Rules-Requires-Root: no
 Section: electronics
diff -Nru stlink-1.7.0+ds/debian/rules stlink-1.7.0+ds/debian/rules
--- stlink-1.7.0+ds/debian/rules	2021-08-15 15:20:57.000000000 +0200
+++ stlink-1.7.0+ds/debian/rules	2023-12-16 23:11:12.000000000 +0100
@@ -10,12 +10,14 @@
 # see FEATURE AREAS in dpkg-buildflags(1)
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)
+
 %:
 	dh $@ --buildsystem cmake
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-    -DSTLINK_UDEV_RULES_DIR='/lib/udev/rules.d'
+    -DSTLINK_UDEV_RULES_DIR=/$(deb_udevdir)/rules.d
 
 override_dh_auto_install:
 	dh_auto_install
diff -Nru stlink-1.7.0+ds/debian/stlink-tools.install stlink-1.7.0+ds/debian/stlink-tools.install
--- stlink-1.7.0+ds/debian/stlink-tools.install	2021-08-15 15:20:57.000000000 +0200
+++ stlink-1.7.0+ds/debian/stlink-tools.install	2023-12-16 23:10:29.000000000 +0100
@@ -1,3 +1,3 @@
 /usr/bin/st-*
-lib/udev/rules.d/*.rules
+${env:deb_udevdir}/rules.d/*.rules
 etc/modprobe.d/*.conf

Reply via email to