Re: [ANNOUNCE] util-linux-ng v2.16-rc2

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Karel Zak <kzak@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, <util-linux-ng@...>
Date: Friday, July 3, 2009 - 5:29 am

On Thu, 2009-07-02 at 22:32 +0200, Kay Sievers wrote:

This seems to make it work in the chroot.

It turns around the logic, and installs the libs in /usr, and moves
the .so to /, so the devel links and the .la files are not changed.

Thanks,
Kay


diff --git a/shlibs/blkid/src/Makefile.am b/shlibs/blkid/src/Makefile.am
index 8b1f46b..b585f0a 100644
--- a/shlibs/blkid/src/Makefile.am
+++ b/shlibs/blkid/src/Makefile.am
@@ -21,7 +21,7 @@ AM_CPPFLAGS += -I$(ul_libblkid_srcdir) $(common_cflags)
 blkidincdir = $(includedir)/blkid
 blkidinc_HEADERS = blkid.h
 
-lib_LTLIBRARIES = libblkid.la
+usrlibexec_LTLIBRARIES = libblkid.la
 libblkid_la_SOURCES = cache.c dev.c devname.c devno.c getsize.c llseek.c  \
 		     probe.c read.c resolve.c save.c tag.c version.c verify.c \
 		     encode.c blkid.h list.h blkidP.h probers/probers.h \
@@ -49,17 +49,15 @@ test_%: %.c
 	$(COMPILE) -DTEST_PROGRAM $< .libs/libblkid.a -o $@ $(common_ldadd)
 
 
-# move devel files from $(libdir) to $(usrlibexecdir) if needed
+# move lib from $(usrlibexecdir) to $(libdir) if needed
 install-data-hook:
-	rm  $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
 	if test "$(usrlibexecdir)" != "$(libdir)"; then \
-		mkdir -p $(DESTDIR)$(usrlibexecdir); \
+		mkdir -p $(DESTDIR)$(libdir); \
 		mv $(DESTDIR)$(libdir)/libblkid.a $(DESTDIR)$(usrlibexecdir)/; \
-		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libblkid.so); \
-		rm $(DESTDIR)$(libdir)/libblkid.so; \
+		so_img_name=$$(readlink $(DESTDIR)$(usrlibexecdir)/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; \
+		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name $(DESTDIR)$(usrlibexecdir)/libblkid.so; \
+		mv $(DESTDIR)$(usrlibexecdir)/libblkid.so.* $(DESTDIR)$(libdir); \
 	fi
 
 uninstall-hook:
diff --git a/shlibs/uuid/src/Makefile.am b/shlibs/uuid/src/Makefile.am
index fff1152..cdd51db 100644
--- a/shlibs/uuid/src/Makefile.am
+++ b/shlibs/uuid/src/Makefile.am
@@ -10,7 +10,7 @@ tst_uuid_CFLAGS = -I$(ul_libuuid_srcdir)
 uuidincdir = $(includedir)/uuid
 uuidinc_HEADERS = uuid.h
 
-lib_LTLIBRARIES = libuuid.la
+usrlibexec_LTLIBRARIES = libuuid.la
 libuuid_la_SOURCES = clear.c compare.c copy.c gen_uuid.c \
            isnull.c pack.c parse.c unpack.c unparse.c uuidd.h \
            uuidd.h uuidP.h uuid_time.c $(uuidinc_HEADERS)
@@ -30,17 +30,15 @@ test_%: %.c
 	$(COMPILE) -DTEST_PROGRAM $< .libs/libuuid.a -o $@
 
 
-# move devel files from $(libdir) to $(usrlibexecdir) if needed
+# move lib from $(usrlibexecdir) to $(libdir) if needed
 install-data-hook:
-	rm  $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
 	if test "$(usrlibexecdir)" != "$(libdir)"; then \
-		mkdir -p $(DESTDIR)$(usrlibexecdir); \
+		mkdir -p $(DESTDIR)$(libdir); \
 		mv $(DESTDIR)$(libdir)/libuuid.a $(DESTDIR)$(usrlibexecdir)/; \
-		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libuuid.so); \
-		rm $(DESTDIR)$(libdir)/libuuid.so; \
+		so_img_name=$$(readlink $(DESTDIR)$(usrlibexecdir)/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; \
+		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name $(DESTDIR)$(usrlibexecdir)/libuuid.so; \
+		mv $(DESTDIR)$(usrlibexecdir)/libuuid.so.* $(DESTDIR)$(libdir); \
 	fi
 
 uninstall-hook:


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ANNOUNCE] util-linux-ng v2.16-rc2, Karel Zak, (Thu Jul 2, 2:10 pm)
Re: [ANNOUNCE] util-linux-ng v2.16-rc2 -- a small patch, Peter Breitenlohner, (Mon Jul 13, 1:05 pm)
Re: [ANNOUNCE] util-linux-ng v2.16-rc2, Kay Sievers, (Thu Jul 2, 4:32 pm)
Re: [ANNOUNCE] util-linux-ng v2.16-rc2, Kay Sievers, (Fri Jul 3, 5:29 am)
Re: [ANNOUNCE] util-linux-ng v2.16-rc2, Karel Zak, (Fri Jul 3, 6:53 am)