3.22.2-udevrulesdir-configure.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 19394974869513ab4a98d72593dce18f08105983 Mon Sep 17 00:00:00 2001
  2. From: Mart Raudsepp <leio@gentoo.org>
  3. Date: Tue, 21 Mar 2017 01:30:52 +0200
  4. Subject: [PATCH] build: Get udevrulesdir from pkg-config
  5. Use the standard way to find the udev rules directory via pkg-config by default,
  6. and support specifying it, should it be necessary.
  7. This is the same logic as in colord.
  8. ---
  9. configure.ac | 9 +++++++++
  10. plugins/rfkill/Makefile.am | 1 -
  11. 2 files changed, 9 insertions(+), 1 deletion(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index 8d4f5cb..5390404 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -135,6 +135,15 @@ fi
  17. AM_CONDITIONAL(HAVE_GUDEV, test x$have_gudev = xyes)
  18. dnl ---------------------------------------------------------------------------
  19. +dnl - Where to install udev rules
  20. +dnl ---------------------------------------------------------------------------
  21. +AC_ARG_WITH([udevrulesdir],
  22. + AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules files]),
  23. + [],
  24. + [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)/rules.d])
  25. +AC_SUBST([udevrulesdir], [$with_udevrulesdir])
  26. +
  27. +dnl ---------------------------------------------------------------------------
  28. dnl - ALSA integration (default enabled)
  29. dnl ---------------------------------------------------------------------------
  30. ALSA_PKG=""
  31. diff --git a/plugins/rfkill/Makefile.am b/plugins/rfkill/Makefile.am
  32. index fed7adc..05f2c78 100644
  33. --- a/plugins/rfkill/Makefile.am
  34. +++ b/plugins/rfkill/Makefile.am
  35. @@ -59,7 +59,6 @@ plugin_in_files = rfkill.gnome-settings-plugin.in
  36. plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin)
  37. -udevrulesdir = $(prefix)/lib/udev/rules.d
  38. udevrules_DATA = 61-gnome-settings-daemon-rfkill.rules
  39. EXTRA_DIST = $(plugin_in_files) $(udevrules_DATA)
  40. --
  41. 2.10.1