summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL47
-rw-r--r--Makefile.am.inc6
-rw-r--r--NEWS5
-rw-r--r--TODO3
-rwxr-xr-xautogen.sh16
-rw-r--r--configure.ac41
-rw-r--r--extras/ata_id/Makefile.am3
-rw-r--r--extras/cdrom_id/Makefile.am4
-rw-r--r--extras/collect/Makefile.am3
-rw-r--r--extras/collect/collect.c2
-rw-r--r--extras/edd_id/Makefile.am4
-rw-r--r--extras/firmware/Makefile.am4
-rw-r--r--extras/floppy/Makefile.am3
-rw-r--r--extras/fstab_import/Makefile.am4
-rw-r--r--extras/gudev/Makefile.am3
-rw-r--r--extras/hid2hci/Makefile.am15
-rw-r--r--extras/path_id/Makefile.am3
-rw-r--r--extras/rule_generator/Makefile.am5
-rw-r--r--extras/scsi_id/Makefile.am3
-rw-r--r--extras/udev-acl/Makefile.am18
-rw-r--r--extras/usb-db/Makefile.am27
-rw-r--r--extras/usb_id/Makefile.am3
-rw-r--r--extras/v4l_id/Makefile.am11
-rw-r--r--libudev/Makefile.am24
-rw-r--r--libudev/libudev-util-private.c2
-rw-r--r--libudev/libudev.c2
-rw-r--r--libudev/libudev.pc.in2
-rw-r--r--rules/Makefile.am1
-rw-r--r--udev/udev-rules.c4
-rw-r--r--udev/udev.h2
-rw-r--r--udev/udevd.c2
31 files changed, 139 insertions, 133 deletions
diff --git a/INSTALL b/INSTALL
index 12678a29bf..7894555df8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,26 +1,22 @@
Usual options for udev installed in the root filesystem are:
- ./configure
- --prefix=/usr
- --exec-prefix=
- --sysconfdir=/etc
-For 64bit multilib-installations also:
- --with-libdir-name=lib64
-For SELinux support:
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/sbin \
+ --libdir=/usr/lib64 \
+ --with-rootlibdir=/lib64 \
+ --libexecdir=/lib/udev \
--with-selinux
All options:
--prefix=
- Prefix for man pages, include files.
- --exec-prefix=
- Prefix for libs, binaries, usually the root filesystem.
- --with-udev-prefix=
- Prefix for internal udev path names, like /dev/, /lib/udev/.
- Only useful for testing and development installations. The
- value is copied from exec-prefix, if not specified otherwise.
+ Usually /usr, prefix for man pages, include files.
--sysconfdir=
Usually /etc.
- --with-libdir-name=
- Directory name for libraries. This is not a path name.
+ --sbindir=
+ Usually /sbin, the place for udevd and udevadm.
+ --libexecdir=
+ Usually /lib/udev, the udev private directory.
--enable-debug
Compile-in verbose debug messages. Usually not needed,
it increases the size of the binaries.
@@ -29,18 +25,21 @@ All options:
is not recommended, as it makes it almost impossible to debug
udev in the running system.
--with-selinux
- Link against SELInux libraries to set the expected context
+ Link against SELinux libraries to set the expected context
for created files.
--disable-extras
- Disable the build of extras with larger external dependencies
- like glib, libacl, libusb, ...
+ Disable the build of all extras which have larger external
+ dependencies like glib, libacl, libusb, ...
The options used in a RPM spec file usually look like:
- --prefix=%{_prefix}
- --exec-prefix=
- --sysconfdir=%{_sysconfdir}
- --with-libdir-name=%{_lib}
- --with-selinux
+ %configure \
+ --prefix=%{_prefix} \
+ --sysconfdir=%{_sysconfdir} \
+ --sbindir=%{_sbindir} \
+ --libdir=%{_libdir} \
+ --with-rootlibdir=/%{_lib} \
+ --libexecdir=/lib/udev \
+ --with-selinux
The defined location for scripts and binaries which are called
from rules is /lib/udev/ on all systems and architectures. Any
diff --git a/Makefile.am.inc b/Makefile.am.inc
index 7a8659ebb8..59d21aa22e 100644
--- a/Makefile.am.inc
+++ b/Makefile.am.inc
@@ -2,9 +2,13 @@ AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I$(top_srcdir)/libudev \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
- -DUDEV_PREFIX=\""$(udev_prefix)"\"
+ -DLIBEXECDIR=\""$(libexecdir)"\"
AM_CFLAGS =
AM_LDFLAGS = \
-Wl,--as-needed
+
+udevrulesdir = \
+ $(libexecdir)/rules.d
+
diff --git a/NEWS b/NEWS
index 1299c315e7..89890a8d06 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ udev 143
========
Bugfixes.
+The configure options have changed because another library needs to be
+installed in a different location. Instead of exec_prefix and udev_prefix,
+libdir, rootlibdir and libexecdir are used. The Details are explained in
+the README file.
+
Event processes now get re-used after they handled an event. This reduces
the number of forks and the pressure on the CPU significantly, because
cloned event processes no longer cause page faults in the main daemon.
diff --git a/TODO b/TODO
index e3631837cb..20395093c7 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,3 @@
- o cleanup old extras which link libudev source directly
-
- o fix configure options and libdir-name, exec-prefix, udev-prefix, libdir, ...
o enumerate: sort control* after pcm*
o add tests for kernel provided DEVNAME logic
o drop modprobe floppy alias (SUSE), it will be in the module (2.6.30)
diff --git a/autogen.sh b/autogen.sh
index 5c5903e0eb..d35e9459ec 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,10 +18,18 @@ case "$CFLAGS" in
;;
esac
-libdirname=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
-args="--prefix=/usr --exec-prefix= --sysconfdir=/etc \
---libdir=/usr/$libdirname --with-libdir-name=$libdirname \
---with-selinux --enable-gtk-doc"
+libdir() {
+ echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
+}
+
+args="--prefix=/usr \
+--sysconfdir=/etc \
+--sbindir=/sbin \
+--libdir=$(libdir /usr/lib) \
+--with-rootlibdir=$(libdir /lib) \
+--libexecdir=/lib/udev \
+--with-selinux \
+--enable-gtk-doc"
export CFLAGS="$CFLAGS $MYCFLAGS"
./configure $args $@
diff --git a/configure.ac b/configure.ac
index bba82ee7bd..c73872e1ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,4 @@
-AC_INIT([udev],
- [143],
- [linux-hotplug@vger.kernel.org])
+AC_INIT([udev], [143], [linux-hotplug@vger.kernel.org])
AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2])
AC_DISABLE_STATIC
@@ -10,28 +8,17 @@ AC_SYS_LARGEFILE
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_LIBTOOL
GTK_DOC_CHECK(1.10)
-
-dnl /* prefix is /usr, exec_prefix is /, if overridden exec_prefix follows prefix */
AC_PREFIX_DEFAULT([/usr])
-test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix=
-
AC_PATH_PROG([XSLTPROC], [xsltproc])
-AC_ARG_WITH(udev-prefix,
- AS_HELP_STRING([--with-udev-prefix=DIR], [add prefix to internal udev path names]),
- [], [with_udev_prefix='${exec_prefix}'])
-udev_prefix=$with_udev_prefix
-AC_SUBST(udev_prefix)
+AC_ARG_WITH([rootlibdir],
+ AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
+ [], [with_rootlibdir=$libdir])
+AC_SUBST([rootlibdir], [$with_rootlibdir])
-AC_ARG_WITH(libdir-name,
- AS_HELP_STRING([--with-libdir-name=DIR], [name of the arch lib directory]),
- [], [with_libdir_name=lib])
-libdir_name=$with_libdir_name
-AC_SUBST(libdir_name)
-
-AC_ARG_WITH(selinux,
+AC_ARG_WITH([selinux],
AS_HELP_STRING([--with-selinux], [enable SELinux support]),
- [], with_selinux=no)
+ [], [with_selinux=no])
if test "x$with_selinux" = xyes; then
LIBS_save=$LIBS
AC_CHECK_LIB(selinux, getprevcon,
@@ -44,14 +31,14 @@ fi
AC_SUBST([SELINUX_LIBS])
AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes])
-AC_ARG_ENABLE(debug,
+AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debug messages]),
- [], enable_debug=no)
+ [], [enable_debug=no])
if test "x$enable_debug" = "xyes"; then
AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
fi
-AC_ARG_ENABLE(logging,
+AC_ARG_ENABLE([logging],
AS_HELP_STRING([--disable-logging], [disable system logging]),
[], enable_logging=yes)
if test "x$enable_logging" = "xyes"; then
@@ -142,10 +129,12 @@ AC_MSG_RESULT([
========
prefix: ${prefix}
- exec_prefix: ${exec_prefix}
- udev_prefix: ${udev_prefix}
+ sysconfdir: ${sysconfdir}
+ sbindir: ${sbindir}
libdir: ${libdir}
- libdir_name: ${libdir_name}
+ rootlibdir: ${rootlibdir}
+ libexecdir: ${libexecdir}
+
datarootdir: ${datarootdir}
mandir: ${mandir}
includedir: ${includedir}
diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am
index 0c37d8029a..18bf20d7f7 100644
--- a/extras/ata_id/Makefile.am
+++ b/extras/ata_id/Makefile.am
@@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
ata_id
ata_id_SOURCES = \
diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am
index bfdfdd3735..99c96b24e8 100644
--- a/extras/cdrom_id/Makefile.am
+++ b/extras/cdrom_id/Makefile.am
@@ -1,10 +1,8 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
cdrom_id
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
60-cdrom_id.rules
diff --git a/extras/collect/Makefile.am b/extras/collect/Makefile.am
index 7ad2937f5d..878b8ec133 100644
--- a/extras/collect/Makefile.am
+++ b/extras/collect/Makefile.am
@@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
collect
collect_SOURCES = \
diff --git a/extras/collect/collect.c b/extras/collect/collect.c
index 3284c3df40..1ec833ac9f 100644
--- a/extras/collect/collect.c
+++ b/extras/collect/collect.c
@@ -34,7 +34,7 @@
#include "libudev.h"
#include "libudev-private.h"
-#define TMPFILE UDEV_PREFIX "/dev/.udev/collect"
+#define TMPFILE "/dev/.udev/collect"
#define BUFSIZE 16
#define UDEV_ALARM_TIMEOUT 180
diff --git a/extras/edd_id/Makefile.am b/extras/edd_id/Makefile.am
index 7c562d3c31..8c5fafefea 100644
--- a/extras/edd_id/Makefile.am
+++ b/extras/edd_id/Makefile.am
@@ -1,10 +1,8 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
edd_id
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
61-persistent-storage-edd.rules
diff --git a/extras/firmware/Makefile.am b/extras/firmware/Makefile.am
index 42f58768c9..b398beea76 100644
--- a/extras/firmware/Makefile.am
+++ b/extras/firmware/Makefile.am
@@ -1,9 +1,7 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-dist_udevhome_SCRIPTS = \
+dist_libexec_SCRIPTS = \
firmware.sh
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
50-firmware.rules
diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am
index 6854d62d57..c842324e48 100644
--- a/extras/floppy/Makefile.am
+++ b/extras/floppy/Makefile.am
@@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
create_floppy_devices
create_floppy_devices_SOURCES = \
diff --git a/extras/fstab_import/Makefile.am b/extras/fstab_import/Makefile.am
index 42acfd15cf..59e208caba 100644
--- a/extras/fstab_import/Makefile.am
+++ b/extras/fstab_import/Makefile.am
@@ -1,10 +1,8 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
fstab_import
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
79-fstab_import.rules
diff --git a/extras/gudev/Makefile.am b/extras/gudev/Makefile.am
index 71565e2a48..dcfc2bdcf3 100644
--- a/extras/gudev/Makefile.am
+++ b/extras/gudev/Makefile.am
@@ -113,3 +113,6 @@ EXTRA_DIST += GUdev-1.0.gir
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif # ENABLE_INTROSPECTION
+
+install-data-hook:
+ rm -f $(DESTDIR)$(libdir)/libgudev-1.0.la
diff --git a/extras/hid2hci/Makefile.am b/extras/hid2hci/Makefile.am
index 45fb840337..62ba58d3fa 100644
--- a/extras/hid2hci/Makefile.am
+++ b/extras/hid2hci/Makefile.am
@@ -1,10 +1,13 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = hid2hci
+libexec_PROGRAMS = \
+ hid2hci
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
-dist_udevrules_DATA = 70-hid2hci.rules
+dist_udevrules_DATA = \
+ 70-hid2hci.rules
-hid2hci_SOURCES = hid2hci.c
-hid2hci_LDADD = @LIBUSB_LIBS@
+hid2hci_SOURCES = \
+ hid2hci.c
+
+hid2hci_LDADD = \
+ @LIBUSB_LIBS@
diff --git a/extras/path_id/Makefile.am b/extras/path_id/Makefile.am
index 867ad5ef8e..c501fc9340 100644
--- a/extras/path_id/Makefile.am
+++ b/extras/path_id/Makefile.am
@@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
path_id
path_id_SOURCES = \
diff --git a/extras/rule_generator/Makefile.am b/extras/rule_generator/Makefile.am
index e8a8f17ee0..4f4e85ac87 100644
--- a/extras/rule_generator/Makefile.am
+++ b/extras/rule_generator/Makefile.am
@@ -1,14 +1,13 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-dist_udevhome_SCRIPTS = \
+dist_libexec_SCRIPTS = \
write_cd_rules \
write_net_rules
+udevhomedir = $(libexecdir)
dist_udevhome_DATA = \
rule_generator.functions
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
75-cd-aliases-generator.rules \
75-persistent-net-generator.rules
diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am
index ffebc38e20..2ae49e3c54 100644
--- a/extras/scsi_id/Makefile.am
+++ b/extras/scsi_id/Makefile.am
@@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
scsi_id
scsi_id_SOURCES = \
diff --git a/extras/udev-acl/Makefile.am b/extras/udev-acl/Makefile.am
index f1a5fbd6c1..7586bb01c1 100644
--- a/extras/udev-acl/Makefile.am
+++ b/extras/udev-acl/Makefile.am
@@ -1,15 +1,19 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = udev-acl
+libexec_PROGRAMS = \
+ udev-acl
-udev_acl_SOURCES = udev-acl.c
-udev_acl_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
-udev_acl_LDADD = -lacl $(top_builddir)/libudev/libudev.la $(GLIB_LIBS)
+udev_acl_SOURCES = \
+ udev-acl.c
+
+udev_acl_CPPFLAGS = \
+ $(AM_CPPFLAGS) $(GLIB_CFLAGS)
+
+udev_acl_LDADD = \
+ -lacl $(top_builddir)/libudev/libudev.la $(GLIB_LIBS)
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = 70-acl.rules
install-exec-hook:
mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d
- ln -sf $(udevhomedir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck
+ ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck
diff --git a/extras/usb-db/Makefile.am b/extras/usb-db/Makefile.am
index 58fd2c9370..2ac61f6aa1 100644
--- a/extras/usb-db/Makefile.am
+++ b/extras/usb-db/Makefile.am
@@ -1,12 +1,23 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = usb-db pci-db
+libexec_PROGRAMS = \
+ usb-db pci-db
-usb_db_SOURCES = usb-db.c
-usb_db_CPPFLAGS = $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
-usb_db_LDADD = $(top_builddir)/libudev/libudev.la
+usb_db_SOURCES = \
+ usb-db.c
-pci_db_SOURCES = $(usb_db_SOURCES)
-pci_db_CPPFLAGS = $(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI
-pci_db_LDADD = $(top_builddir)/libudev/libudev.la
+usb_db_CPPFLAGS = \
+ $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
+
+usb_db_LDADD = \
+ $(top_builddir)/libudev/libudev.la
+
+
+pci_db_SOURCES = \
+ $(usb_db_SOURCES)
+
+pci_db_CPPFLAGS = \
+ $(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI
+
+pci_db_LDADD = \
+ $(top_builddir)/libudev/libudev.la
diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am
index a9bd407031..bd76fb76c1 100644
--- a/extras/usb_id/Makefile.am
+++ b/extras/usb_id/Makefile.am
@@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = \
+libexec_PROGRAMS = \
usb_id
usb_id_SOURCES = \
diff --git a/extras/v4l_id/Makefile.am b/extras/v4l_id/Makefile.am
index 3f8b0f75b4..9345282716 100644
--- a/extras/v4l_id/Makefile.am
+++ b/extras/v4l_id/Makefile.am
@@ -1,9 +1,10 @@
include $(top_srcdir)/Makefile.am.inc
-udevhomedir = $(udev_prefix)/lib/udev
-udevhome_PROGRAMS = v4l_id
+libexec_PROGRAMS = \
+ v4l_id
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
-dist_udevrules_DATA = 60-persistent-v4l.rules
+dist_udevrules_DATA = \
+ 60-persistent-v4l.rules
-v4l_id_SOURCES = v4l_id.c
+v4l_id_SOURCES = \
+ v4l_id.c
diff --git a/libudev/Makefile.am b/libudev/Makefile.am
index 5d0cbf74b1..522244641e 100644
--- a/libudev/Makefile.am
+++ b/libudev/Makefile.am
@@ -12,7 +12,6 @@ test_libudev_SOURCES = \
test_libudev_LDADD = \
libudev.la
-rootlibdir = $(exec_prefix)/$(libdir_name)
rootlib_LTLIBRARIES = \
libudev.la
@@ -36,25 +35,24 @@ libudev_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-symbols $(top_srcdir)/libudev/exported_symbols
-pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
-pkgconfig_DATA = libudev.pc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+ libudev.pc
EXTRA_DIST = \
exported_symbols
-# move devel files to $(prefix)$(libdir_name) if needed
+# move devel files from $(rootlibdir) to $(libdir) if needed
install-data-hook:
- rm $(DESTDIR)$(rootlibdir)/libudev.la
- if test "$(prefix)" != "$(exec_prefix)"; then \
- mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \
- mv $(DESTDIR)$(rootlibdir)/libudev.a $(DESTDIR)$(prefix)/$(libdir_name)/; \
+ rm -f $(DESTDIR)$(rootlibdir)/libudev.la
+ if test "$(libdir)" != "$(rootlibdir)"; then \
+ mkdir -p $(DESTDIR)$(rootlibdir); \
so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libudev.so); \
rm $(DESTDIR)$(rootlibdir)/libudev.so; \
- so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
- ln -sf $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \
- $(DESTDIR)$(prefix)/$(libdir_name)/libudev.so; \
+ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+ ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so; \
fi
uninstall-hook:
- rm -f $(DESTDIR)$(prefix)/$(libdir_name)/libudev.a
- rm -f $(DESTDIR)$(prefix)/$(libdir_name)/libudev.so*
+ rm -f $(DESTDIR)$(rootlibdir)/libudev.a
+ rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c
index f22c04184b..811db9cf39 100644
--- a/libudev/libudev-util-private.c
+++ b/libudev/libudev-util-private.c
@@ -290,7 +290,7 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
/* allow programs in /lib/udev/ to be called without the path */
if (argv[0][0] != '/') {
- util_strscpyl(program, sizeof(program), UDEV_PREFIX "/lib/udev/", argv[0], NULL);
+ util_strscpyl(program, sizeof(program), LIBEXECDIR "/", argv[0], NULL);
argv[0] = program;
}
diff --git a/libudev/libudev.c b/libudev/libudev.c
index f6fdcb2dfd..695443cf3b 100644
--- a/libudev/libudev.c
+++ b/libudev/libudev.c
@@ -123,7 +123,7 @@ struct udev *udev_new(void)
udev->log_priority = LOG_ERR;
udev_list_init(&udev->properties_list);
udev->run = 1;
- udev->dev_path = strdup(UDEV_PREFIX "/dev");
+ udev->dev_path = strdup("/dev");
udev->sys_path = strdup("/sys");
config_file = strdup(SYSCONFDIR "/udev/udev.conf");
if (udev->dev_path == NULL ||
diff --git a/libudev/libudev.pc.in b/libudev/libudev.pc.in
index 38fc052e34..677d53a97e 100644
--- a/libudev/libudev.pc.in
+++ b/libudev/libudev.pc.in
@@ -1,6 +1,6 @@
prefix=@prefix@
exec_prefix=@prefix@
-libdir=@prefix@/@libdir_name@
+libdir=@libdir@
includedir=@prefix@/include
Name: libudev
diff --git a/rules/Makefile.am b/rules/Makefile.am
index 694c54be07..4bf5bc5f2b 100644
--- a/rules/Makefile.am
+++ b/rules/Makefile.am
@@ -1,6 +1,5 @@
include $(top_srcdir)/Makefile.am.inc
-udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
rules.d/50-udev-default.rules \
rules.d/60-persistent-storage.rules \
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index 7db890fed9..174edfd9c4 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -1338,7 +1338,7 @@ static int add_rule(struct udev_rules *rules, char *line,
/* allow programs in /lib/udev called without the path */
if (value[0] != '/')
- util_strscpyl(file, sizeof(file), UDEV_PREFIX "/lib/udev/", value, NULL);
+ util_strscpyl(file, sizeof(file), LIBEXECDIR "/", value, NULL);
else
util_strscpy(file, sizeof(file), value);
pos = strchr(file, ' ');
@@ -1734,7 +1734,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
add_matching_files(udev, &sort_list, filename, ".rules");
/* read default rules */
- add_matching_files(udev, &sort_list, UDEV_PREFIX "/lib/udev/rules.d", ".rules");
+ add_matching_files(udev, &sort_list, LIBEXECDIR "/rules.d", ".rules");
/* sort all rules files by basename into list of files */
udev_list_entry_foreach_safe(sort_loop, sort_tmp, udev_list_get_entry(&sort_list)) {
diff --git a/udev/udev.h b/udev/udev.h
index 3e3ecfb1fe..391276f6e4 100644
--- a/udev/udev.h
+++ b/udev/udev.h
@@ -28,7 +28,7 @@
#define DEFAULT_FAKE_PARTITIONS_COUNT 15
#define UDEV_EVENT_TIMEOUT 180
-#define UDEV_CTRL_SOCK_PATH "@" UDEV_PREFIX "/org/kernel/udev/udevd"
+#define UDEV_CTRL_SOCK_PATH "@/org/kernel/udev/udevd"
struct udev_event {
struct udev *udev;
diff --git a/udev/udevd.c b/udev/udevd.c
index 292f4374d7..b2e4a022c5 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -869,7 +869,7 @@ int main(int argc, char *argv[])
} else {
char filename[UTIL_PATH_SIZE];
- inotify_add_watch(pfd[FD_INOTIFY].fd, UDEV_PREFIX "/lib/udev/rules.d",
+ inotify_add_watch(pfd[FD_INOTIFY].fd, LIBEXECDIR "/rules.d",
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
inotify_add_watch(pfd[FD_INOTIFY].fd, SYSCONFDIR "/udev/rules.d",
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);