Bug#1056966: autorandr: Delegate udev rules install location to udev.pc

2023-11-30 Thread Don Armstrong
On Mon, 27 Nov 2023, Chris Hofstaedtler wrote:
> thanks for applying the patches from #1054477. I have now noticed that
> autorandr hard-codes the udev rules directory to /lib/udev/rules.d.
> I'm attaching a patch which delegates the path decision to udev.pc,
> merely by removing the argument to make.
> 
> In the near future udev.pc will change the path to
> /usr/lib/udev(/rules.d), and then your package can pick this up in a
> binNMU without further changes.


Thanks for the patch, I'll apply it shortly and upload it the next time
I do an upload (or when the udev rules change happens, whatever is
earlier).

-- 
Don Armstrong  https://www.donarmstrong.com

Science is a way of trying not to fool yourself. The first principle
is that you must not fool yourself, and you are the easiest person to
fool.
 -- Richard Feynman "What is and What Should be the Role of Scientific
Culture in Modern Society"; 1964



Bug#1056966: autorandr: Delegate udev rules install location to udev.pc

2023-11-27 Thread Chris Hofstaedtler
Package: autorandr
Version: 1.14-1
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

Hello Don,

thanks for applying the patches from #1054477. I have now noticed that
autorandr hard-codes the udev rules directory to /lib/udev/rules.d. I'm
attaching a patch which delegates the path decision to udev.pc, merely
by removing the argument to make.

In the near future udev.pc will change the path to
/usr/lib/udev(/rules.d), and then your package can pick this up in a
binNMU without further changes.

Thanks for considering,
Chris
diff -Nru autorandr-1.14/debian/changelog autorandr-1.14/debian/changelog
--- autorandr-1.14/debian/changelog 2023-11-18 06:31:51.0 +0100
+++ autorandr-1.14/debian/changelog 2023-11-27 11:24:39.0 +0100
@@ -1,3 +1,10 @@
+autorandr (1.14-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move udev rules into /usr.  (Closes: #-1)
+
+ -- Chris Hofstaedtler   Mon, 27 Nov 2023 11:24:39 +0100
+
 autorandr (1.14-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru autorandr-1.14/debian/rules autorandr-1.14/debian/rules
--- autorandr-1.14/debian/rules 2023-11-18 06:27:34.0 +0100
+++ autorandr-1.14/debian/rules 2023-11-27 11:24:39.0 +0100
@@ -4,12 +4,12 @@
dh $@
 
 override_dh_auto_build:
-   dh_auto_build -- UDEV_RULES_DIR=/lib/udev/rules.d \
+   dh_auto_build -- \
BASH_COMPLETIONS_DIR=/usr/share/bash-completion/completions \
PM_SLEEPHOOKS_DIR=/etc/pm/sleep.d/
 
 override_dh_auto_install:
-   dh_auto_install -- UDEV_RULES_DIR=/lib/udev/rules.d \
+   dh_auto_install -- \
BASH_COMPLETIONS_DIR=/usr/share/bash-completion/completions \
PM_SLEEPHOOKS_DIR=/etc/pm/sleep.d/
install -D -m 755 contrib/pm-utils/40autorandr 
debian/autorandr/etc/pm/sleep.d/40autorandr