Source: indi-sx
Version: 1.16+20221222162728-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.

A patch to the upstream build system is included, to align it
with other, similar libraries.

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 indi-sx-1.16+20221222162728/debian/changelog indi-sx-1.16+20221222162728/debian/changelog
--- indi-sx-1.16+20221222162728/debian/changelog	2022-12-22 17:28:43.000000000 +0100
+++ indi-sx-1.16+20221222162728/debian/changelog	2023-12-17 00:51:23.000000000 +0100
@@ -1,3 +1,10 @@
+indi-sx (1.16+20221222162728-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use udev.pc to place udev files. (Closes: #-1)
+
+ -- Chris Hofstaedtler <z...@debian.org>  Sun, 17 Dec 2023 00:51:23 +0100
+
 indi-sx (1.16+20221222162728-1) unstable; urgency=medium
 
   * build version from git
diff -Nru indi-sx-1.16+20221222162728/debian/control indi-sx-1.16+20221222162728/debian/control
--- indi-sx-1.16+20221222162728/debian/control	2022-12-22 17:27:33.000000000 +0100
+++ indi-sx-1.16+20221222162728/debian/control	2023-12-17 00:51:23.000000000 +0100
@@ -8,6 +8,8 @@
 	, libusb-1.0-0-dev
 	, libcfitsio-dev
 	, libindi-dev
+	, pkgconf
+	, systemd-dev
 	, zlib1g-dev
 	, libnova-dev
 Standards-Version: 4.6.0
diff -Nru indi-sx-1.16+20221222162728/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch indi-sx-1.16+20221222162728/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch
--- indi-sx-1.16+20221222162728/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch	1970-01-01 01:00:00.000000000 +0100
+++ indi-sx-1.16+20221222162728/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch	2023-12-17 00:51:23.000000000 +0100
@@ -0,0 +1,24 @@
+Allow overriding udev install location in upstream build system.
+
+Index: indi-sx-1.16+20221222162728/CMakeLists.txt
+===================================================================
+--- indi-sx-1.16+20221222162728.orig/CMakeLists.txt
++++ indi-sx-1.16+20221222162728/CMakeLists.txt
+@@ -4,7 +4,7 @@ PROJECT(indi_sx CXX C)
+ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/")
+ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/")
+ include(GNUInstallDirs)
+-set(RULES_INSTALL_DIR "/lib/udev/rules.d/")
++set(UDEVRULES_INSTALL_DIR "/lib/udev/rules.d/" CACHE PATH "Destination for udev rules files")
+ 
+ SET(CMAKE_CXX_STANDARD 11)
+ set (VERSION_MAJOR 1)
+@@ -106,7 +106,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin
+   set (CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
+   set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+-  install(FILES 99-sx.rules DESTINATION ${RULES_INSTALL_DIR})
++  install(FILES 99-sx.rules DESTINATION ${UDEVRULES_INSTALL_DIR})
+   set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n  ${CPACK_PACKAGE_DESCRIPTION}")
+   set (CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
+   set (CPACK_GENERATOR "DEB;RPM")
diff -Nru indi-sx-1.16+20221222162728/debian/patches/series indi-sx-1.16+20221222162728/debian/patches/series
--- indi-sx-1.16+20221222162728/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ indi-sx-1.16+20221222162728/debian/patches/series	2023-12-17 00:51:23.000000000 +0100
@@ -0,0 +1 @@
+CMakeLists-UDEVRULES_INSTALL_DIR.patch
diff -Nru indi-sx-1.16+20221222162728/debian/rules indi-sx-1.16+20221222162728/debian/rules
--- indi-sx-1.16+20221222162728/debian/rules	2022-12-22 17:27:33.000000000 +0100
+++ indi-sx-1.16+20221222162728/debian/rules	2023-12-17 00:51:23.000000000 +0100
@@ -2,3 +2,7 @@
 
 %:
 	dh $@
+
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		-DUDEVRULES_INSTALL_DIR=$(shell pkg-config --variable=udevdir udev)/rules.d

Reply via email to