From 179f3d40e2ceb0da5b22dfc6b3bc4d22d2af9775 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 4 May 2011 14:32:08 +0200 Subject: [PATCH] lib/functions.in: improved to move '/lib/foo.so' symlinks into '/usr/lib' because they are only needed at compile time --- lib/functions.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/functions.in b/lib/functions.in index 8523203..2b1e7b7 100644 --- a/lib/functions.in +++ b/lib/functions.in @@ -313,7 +313,7 @@ function run_check() { # postflist_static_lib() { echo "Processing static lib corrections ..." - egrep '^(lib|lib64)/.*\.(a\..*|a|la)$' $builddir/flist.txt | + egrep '^(lib|lib64)/.*\.(a\..*|a|la|so)$' $builddir/flist.txt | while read fn ; do [ -e $root/$fn -o -L $root/$fn ] || continue @@ -329,6 +329,12 @@ postflist_static_lib() { *) mv -fv $root/$fn $root/usr/$fn ;; + *.so) + if [ -L "$root/$fn" ]; then + ln -svf "$root/lib/$( readlink $fn )" "$root/usr/$fn" + rm -f "$root/$fn" + fi + ;; esac add_flist $root/usr/$fn done