diff --git a/scripts/Build-Pkg b/scripts/Build-Pkg index aa19843a1..12b4f067a 100755 --- a/scripts/Build-Pkg +++ b/scripts/Build-Pkg @@ -505,8 +505,8 @@ flistdel="etc/ld.so.cache|var/tmp/.*|var/lock/.*|var/run/.*|usr/tmp/.*|.*\\.old" pkgsplits="" if [ "$ROCKCFG_SPLIT_DEV" != 0 ]; then # this doesn't affect files in /lib, just /.../lib - # so there mustn't be an exception for linux kernel modules - splitreg 40 dev '(/lib/.*\.(la|a|o)$|/include/)' + # so there needn't be an exception for linux kernel modules + splitreg 40 dev '(/lib/.*\.(la|a|o)$|/include/|/man[23]/)' splitdesc_dev() { desc_I="$desc_I (development files)"; } fi if [ "$ROCKCFG_SPLIT_DOC" != 0 ]; then @@ -556,7 +556,7 @@ postflist="" ; hook_add postflist 5 'eval "$postflist"' finish="" ; hook_add finish 5 'eval "$finish"' [ "$ROCKCFG_DO_CHECK" = 1 ] && hook_add inmake 6 'run_check' -hook_add postflist 3 'postflist_static_lib' +hook_add postflist 3 'postflist_libs' configprefix="" ; autogen=0 ; automakever="" configscript="./configure" ; extraconfopt="" diff --git a/scripts/functions b/scripts/functions index 8e47a8042..9a83a29e4 100644 --- a/scripts/functions +++ b/scripts/functions @@ -318,17 +318,19 @@ function run_check() { # move the static libs from lib to usr/lib and correct the libdir used # inside the .la file # -postflist_static_lib() { - echo "Processing static lib corrections ..." - egrep '^lib/.*\.(a|la)$' $builddir/flist.txt | +postflist_libs() { + echo "Processing /lib corrections ..." + egrep '^lib/.*\.(a|la|so)$' $builddir/flist.txt | while read fn ; do [ -e $root/$fn -o -L $root/$fn ] || continue - if [[ $fn = *.a ]] ; then + if [[ $fn = *.a ]] ; then mv -fv $root/$fn $root/usr/$fn - else + elif [[ $fn = *.so ]] ; then + [ -e $root/usr/$fn ] || ln -sfv /$fn $root/usr/$fn + elif [[ $fn = *.la ]] ; then sed "s,\([ =']\)/lib\(.*\),\1/usr/lib\2,g" \ $root/$fn > $root/usr/$fn - rm $root/$fn + rm -fv $root/$fn fi add_flist $root/usr/$fn done