==> "mn" == Martin Norbäck <[EMAIL PROTECTED]> writes:

    >> > Agreed -- the same is true with Debian -- minimizing the
    >> Debian diff > is a good idea, all other things being equal.  In
    >> any case, thanks > so much.  I'll try this -- it looks like a
    >> good solution.
    >> 
    >> That appeared to work perfectly -- thanks again.

    mn> Worked for me too when building RPMS!

I didn't realize it was that popular.  In that case, here is the shell
script I'm using.  It's not easy to stick helper scripts into spec
files, so you'll probably need to put it in as a Source: file and
refer to it using $RPM_SOURCE_DIR:

======================== 8< ==========================================
#!/bin/sh
#
# find_la_libdirs
#
# Find all of the .la libdirs under the current directory for prelinking.
#
# Author: Carl D. Roth <[EMAIL PROTECTED]>
#

if test -z "$DESTDIR"; then
  if test $# -ne 1; then
    echo "$0: *** need to supply a DESTDIR"
    exit 1
  fi
  DESTDIR=$1
fi

builddir=.

# Find each la-file, and search for its' libdir:
for lafile in `find $builddir -name "*.la" -print`; do
  libdir=`sed -n -e "s:libdir='\(.*\)':\1:p" $lafile`
  test "$libdir" || continue
  
  case " $libpath " in
    *\ $libdir\ *) continue ;;
  esac

  libpath="$libpath $libdir"
done

# make it colon-separated for LIBRARY_PATH:
for lib in $libpath; do
  libpathc=$libpathc${libpathc+":"}$DESTDIR$lib
done

echo $libpathc

exit 0
======================== 8< ==========================================

Here is a spec file fragment (libgii.spec, to be specific);


======================== 8< ==========================================
%install
[ -e "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

# get the set of libtool library paths:
LIBRARY_PATH=$LIBRARY_PATH${LIBRARY_PATH+":"}`$RPM_SOURCE_DIR/find_la_libdirs 
$RPM_BUILD_ROOT`
export LIBRARY_PATH

%makeinstall
======================== 8< ==========================================

Sorry, I don't speak ".deb".

The script is a little heavy-handed; it picks up any .la files,
whether they are lib_*, libexec_*, or noinst_*.

- C


_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to