[Spice-devel] [PATCH linux vdagent] Don't install udev rules into /lib
Jonathon Jongsma
jjongsma at redhat.com
Wed Nov 29 17:48:52 UTC 2017
Ask udev (via pkg-config) for the appropriate directory to install udev
rules. This is useful for recent distributions (e.g. RHEL7, fedora) that
no longer have a root /lib directory and instead use /usr/lib
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
---
Makefile.am | 2 +-
configure.ac | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 4689713..007783e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,7 +106,7 @@ systemdunit_DATA = \
$(top_srcdir)/data/spice-vdagentd.service \
$(top_srcdir)/data/spice-vdagentd.socket
-udevrulesdir = /lib/udev/rules.d
+udevrulesdir = $(udevdir)/rules.d
udevrules_DATA = $(top_srcdir)/data/70-spice-vdagentd.rules
tmpfilesdir = $(prefix)/lib/tmpfiles.d
diff --git a/configure.ac b/configure.ac
index d92b527..60f9ced 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,10 @@ else
fi
AM_CONDITIONAL(HAVE_LIBSYSTEMD_LOGIN, test x"$have_libsystemd_login" = "xyes")
+#udevdir
+udevdir=$($PKG_CONFIG --variable=udevdir udev)
+AC_SUBST(udevdir)
+
if test "$with_session_info" = "auto" || test "$with_session_info" = "console-kit"; then
AC_DEFINE([HAVE_CONSOLE_KIT], [1], [If defined, vdagentd will be compiled with ConsoleKit support])
have_console_kit="yes"
@@ -203,6 +207,7 @@ AC_MSG_NOTICE([
install RH initscript: ${init_redhat}
install systemd service: ${init_systemd}
+ udevdir: ${udevdir}
Now type 'make' to build $PACKAGE
--
2.13.6
More information about the Spice-devel
mailing list