From d7c9acbfe3c69abcb4d29976da587ace425685c7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 30 Jun 2009 11:38:03 +0200 Subject: [PATCH] libuuid: add install-hook for libuuid.[a,so] devel files Unfortunately, libtool installs all files to $libdir (/lib), but we need devel files in $usrlibexecdir (/usr/lib). Signed-off-by: Karel Zak --- shlibs/uuid/src/Makefile.am | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/shlibs/uuid/src/Makefile.am b/shlibs/uuid/src/Makefile.am index cc2ee7df..fff11526 100644 --- a/shlibs/uuid/src/Makefile.am +++ b/shlibs/uuid/src/Makefile.am @@ -29,3 +29,21 @@ tests: all $(tests) test_%: %.c $(COMPILE) -DTEST_PROGRAM $< .libs/libuuid.a -o $@ + +# move devel files from $(libdir) to $(usrlibexecdir) if needed +install-data-hook: + rm $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES) + if test "$(usrlibexecdir)" != "$(libdir)"; then \ + mkdir -p $(DESTDIR)$(usrlibexecdir); \ + mv $(DESTDIR)$(libdir)/libuuid.a $(DESTDIR)$(usrlibexecdir)/; \ + so_img_name=$$(readlink $(DESTDIR)$(libdir)/libuuid.so); \ + rm $(DESTDIR)$(libdir)/libuuid.so; \ + so_img_rel_target=$$(echo $(usrlibexecdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ + ln -sf $$so_img_rel_target$(libdir)/$$so_img_name \ + $(DESTDIR)$(usrlibexecdir)/libuuid.so; \ + fi + +uninstall-hook: + rm -f $(DESTDIR)$(usrlibexecdir)/libuuid.a + rm -f $(DESTDIR)$(usrlibexecdir)/libuuid.so* + -- 2.39.5