summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2009-06-30 11:49:14 +0200
committerKarel Zak2009-06-30 11:49:14 +0200
commitd5428f45a2cae47a656ed121b7d2683371e808fa (patch)
treed3868c18b86e2c73195451317f2062430751b563
parentlibuuid: add install-hook for libuuid.[a,so] devel files (diff)
downloadkernel-qcow2-util-linux-d5428f45a2cae47a656ed121b7d2683371e808fa.tar.gz
kernel-qcow2-util-linux-d5428f45a2cae47a656ed121b7d2683371e808fa.tar.xz
kernel-qcow2-util-linux-d5428f45a2cae47a656ed121b7d2683371e808fa.zip
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 <kzak@redhat.com>
-rw-r--r--shlibs/blkid/src/Makefile.am17
1 files changed, 17 insertions, 0 deletions
diff --git a/shlibs/blkid/src/Makefile.am b/shlibs/blkid/src/Makefile.am
index 18e5c2e39..8b1f46be7 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*