From d5428f45a2cae47a656ed121b7d2683371e808fa Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 30 Jun 2009 11:49:14 +0200 Subject: [PATCH] libblkid: 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/blkid/src/Makefile.am | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/shlibs/blkid/src/Makefile.am b/shlibs/blkid/src/Makefile.am index 18e5c2e3..8b1f46be 100644 --- a/shlibs/blkid/src/Makefile.am +++ b/shlibs/blkid/src/Makefile.am @@ -48,3 +48,20 @@ tests: all $(tests) test_%: %.c $(COMPILE) -DTEST_PROGRAM $< .libs/libblkid.a -o $@ $(common_ldadd) + +# 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)/libblkid.a $(DESTDIR)$(usrlibexecdir)/; \ + so_img_name=$$(readlink $(DESTDIR)$(libdir)/libblkid.so); \ + rm $(DESTDIR)$(libdir)/libblkid.so; \ + so_img_rel_target=$$(echo $(usrlibexecdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ + ln -sf $$so_img_rel_target$(libdir)/$$so_img_name \ + $(DESTDIR)$(usrlibexecdir)/libblkid.so; \ + fi + +uninstall-hook: + rm -f $(DESTDIR)$(usrlibexecdir)/libblkid.a + rm -f $(DESTDIR)$(usrlibexecdir)/libblkid.so* -- 2.39.5