diff options
Diffstat (limited to 'libudev')
-rw-r--r-- | libudev/Makefile.am | 24 | ||||
-rw-r--r-- | libudev/libudev-util-private.c | 2 | ||||
-rw-r--r-- | libudev/libudev.c | 2 | ||||
-rw-r--r-- | libudev/libudev.pc.in | 2 |
4 files changed, 14 insertions, 16 deletions
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 |