Source: indi-armadillo-platypus
Version: 1.0+20221226082641-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 debian/ patch to align CMakeLists.txt with regard to
UDEVRULES_INSTALL_DIR with the other indi-*/camera libraries is
also included.

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-armadillo-platypus-1.0+20221226082641/debian/changelog indi-armadillo-platypus-1.0+20221226082641/debian/changelog
--- indi-armadillo-platypus-1.0+20221226082641/debian/changelog	2022-12-26 09:27:56.000000000 +0100
+++ indi-armadillo-platypus-1.0+20221226082641/debian/changelog	2023-12-17 01:13:19.000000000 +0100
@@ -1,3 +1,10 @@
+indi-armadillo-platypus (1.0+20221226082641-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 01:13:19 +0100
+
 indi-armadillo-platypus (1.0+20221226082641-1) unstable; urgency=medium
 
   * build version from git
diff -Nru indi-armadillo-platypus-1.0+20221226082641/debian/control indi-armadillo-platypus-1.0+20221226082641/debian/control
--- indi-armadillo-platypus-1.0+20221226082641/debian/control	2022-12-26 09:26:45.000000000 +0100
+++ indi-armadillo-platypus-1.0+20221226082641/debian/control	2023-12-17 01:13:15.000000000 +0100
@@ -7,6 +7,8 @@
 	, cmake
 	, libindi-dev
 	, libnova-dev
+	, pkgconf
+	, systemd-dev
 Standards-Version: 4.6.0
 Homepage: https://github.com/indilib/indi-3rdparty
 Rules-Requires-Root: no
diff -Nru indi-armadillo-platypus-1.0+20221226082641/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch indi-armadillo-platypus-1.0+20221226082641/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch
--- indi-armadillo-platypus-1.0+20221226082641/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch	1970-01-01 01:00:00.000000000 +0100
+++ indi-armadillo-platypus-1.0+20221226082641/debian/patches/CMakeLists-UDEVRULES_INSTALL_DIR.patch	2023-12-17 01:13:19.000000000 +0100
@@ -0,0 +1,22 @@
+Allow overriding udev install location in upstream build system.
+
+Index: indi-armadillo-platypus-1.0+20221226082641/CMakeLists.txt
+===================================================================
+--- indi-armadillo-platypus-1.0+20221226082641.orig/CMakeLists.txt
++++ indi-armadillo-platypus-1.0+20221226082641/CMakeLists.txt
+@@ -6,7 +6,7 @@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_C
+ include(GNUInstallDirs)
+ 
+ SET(CMAKE_CXX_STANDARD 11)
+-SET(RULES_INSTALL_DIR "/lib/udev/rules.d/")
++SET(UDEVRULES_INSTALL_DIR "/lib/udev/rules.d/" CACHE PATH "Destination for udev rules")
+ 
+ find_package(INDI REQUIRED)
+ 
+@@ -70,5 +70,5 @@ install(TARGETS indi_platypus_focus RUNT
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_lunatico.xml DESTINATION ${INDI_DATA_DIR})
+ 
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+-install(FILES 99-armadilloplatypus.rules DESTINATION ${RULES_INSTALL_DIR})
++install(FILES 99-armadilloplatypus.rules DESTINATION ${UDEVRULES_INSTALL_DIR})
+ endif()
diff -Nru indi-armadillo-platypus-1.0+20221226082641/debian/patches/series indi-armadillo-platypus-1.0+20221226082641/debian/patches/series
--- indi-armadillo-platypus-1.0+20221226082641/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ indi-armadillo-platypus-1.0+20221226082641/debian/patches/series	2023-12-17 01:11:54.000000000 +0100
@@ -0,0 +1 @@
+CMakeLists-UDEVRULES_INSTALL_DIR.patch
diff -Nru indi-armadillo-platypus-1.0+20221226082641/debian/rules indi-armadillo-platypus-1.0+20221226082641/debian/rules
--- indi-armadillo-platypus-1.0+20221226082641/debian/rules	2022-12-26 09:26:45.000000000 +0100
+++ indi-armadillo-platypus-1.0+20221226082641/debian/rules	2023-12-17 01:13:02.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