It's more safe to create symlinks in the target directory and use
$(LN_S) rather than directly call "ln -sf".
Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
mv $(DESTDIR)$(usrlibexecdir)/libblkid.so.* $(DESTDIR)$(libdir); \
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; \
+ (cd $(DESTDIR)$(usrlibexecdir) && \
+ rm -f libblkid.so && \
+ $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libblkid.so); \
fi
uninstall-hook:
mv $(DESTDIR)$(usrlibexecdir)/libuuid.so.* $(DESTDIR)$(libdir); \
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; \
+ (cd $(DESTDIR)$(usrlibexecdir) && \
+ rm -f libuuid.so && \
+ $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libuuid.so); \
fi
uninstall-hook: