Magellan Linux

Diff of /branches/R11-unstable/include/mtools.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12655 by niro, Tue Jun 26 16:15:58 2012 UTC revision 14029 by niro, Mon Nov 12 15:56:03 2012 UTC
# Line 1  Line 1 
1  # $Header: /magellan-cvs/smage/include/mtools.sminc,v 1.39 2008/04/20 08:28:23 niro Exp $  # $Id$
2  # some special build tools  # some special build tools
3    
4  # automatical inherit mtools.minc  # automatical inherit mtools.minc
# Line 589  minstalllib() Line 589  minstalllib()
589   local dest   local dest
590   local verbose="-v"   local verbose="-v"
591    
592   # check for busybox as it doesn'tz support 'ln -v'   # check for busybox as it doesn't support 'ln -v'
593   [[ $(readlink $(which ln)) = */busybox ]] && verbose=""   [[ $(readlink $(which ln)) = */busybox ]] && verbose=""
594    
595   [[ -z $1 ]] && die "No file given"   [[ -z $1 ]] && die "No file given"
# Line 616  minstalllib() Line 616  minstalllib()
616   # install our library   # install our library
617   install -v -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die   install -v -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die
618    
619   # create libtool symlinks   # prefer scanelf
620   # 1. - library.so.1.0.0 -> library.so.1.0   if [[ -x $(type -P scanelf) ]]
  if [ "${file%.*}" != *.so ]  
621   then   then
622   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})   local soname="$(scanelf -SB ${file} | cut -d' ' -f2)"
623   fi   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/${soname} || die
624   # 2. - library.so.1.0.0 -> library.so.1   else
625   if [ "${file%.*.*}" != *.so ]   echo -e "${COLYELLOW}minstalllib(): Warning: scanelf not found, using fallback symlink method${COLDEFAULT}"
626   then  
627   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})   # create libtool symlinks
628     # 1. - library.so.1.0.0 -> library.so.1.0
629     if [ "${file%.*}" != *.so ]
630     then
631     ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*}) || die
632     fi
633     # 2. - library.so.1.0.0 -> library.so.1
634     if [ "${file%.*.*}" != *.so ]
635     then
636     ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*}) || die
637     fi
638     # 3. - library.so.1.0.0.0 -> library.so.1
639     if [ "${file%.*.*.*}" != *.so ]
640     then
641     ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*.*}) || die
642     fi
643   fi   fi
644  }  }
645    

Legend:
Removed from v.12655  
changed lines
  Added in v.14029