[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hack for inter-library dependency (make DESTDIR=... install) problem

From: roth . gnu
Subject: Re: Hack for inter-library dependency (make DESTDIR=... install) problem.
Date: 07 Dec 2001 14:58:14 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

==> "mn" == Martin Norb채ck <address@hidden> 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< ==========================================
# find_la_libdirs
# Find all of the .la libdirs under the current directory for prelinking.
# Author: Carl D. Roth <address@hidden>

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


# 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 ;;

  libpath="$libpath $libdir"

# make it colon-separated for LIBRARY_PATH:
for lib in $libpath; do

echo $libpathc

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

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

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

# get the set of libtool library paths:

======================== 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]