From: Karel Zak Date: Tue, 30 Jun 2009 09:49:14 +0000 (+0200) Subject: libblkid: add install-hook for libuuid.[a,so] devel files X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5428f45a2cae47a656ed121b7d2683371e808fa;p=util-linux 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 --- 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*