Magellan Linux

Diff of /smage/branches/alx07x-unstable/include/mtools.sminc

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

revision 5114 by niro, Tue Sep 24 09:03:16 2013 UTC revision 5117 by niro, Tue Sep 24 09:05:43 2013 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 ]  
  then  
  ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})  
  fi  
  # 2. - library.so.1.0.0 -> library.so.1  
  if [ "${file%.*.*}" != *.so ]  
621   then   then
622   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})   local soname="$(scanelf -qBF '%S#p' ${file})"
623     ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/${soname} || die
624     else
625     echo -e "${COLYELLOW}minstalllib(): Warning: scanelf not found, using fallback symlink method${COLDEFAULT}"
626    
627     # 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    
# Line 669  mdelete() Line 683  mdelete()
683   local dest="$1"   local dest="$1"
684   local opts   local opts
685    
686     # enforce
687     if [[ $1 = -f ]]
688     then
689     opts="-f"
690     dest="$2"
691     fi
692    
693   # recursive   # recursive
694   if [[ $1 = -r ]] || [[ $1 = -R ]]   if [[ $1 = -r ]] || [[ $1 = -R ]]
695   then   then
# Line 885  maddconfig() Line 906  maddconfig()
906   -b|--no-bindir) prefix=""; argv="$2" ;;   -b|--no-bindir) prefix=""; argv="$2" ;;
907   esac   esac
908    
909   [[ -z ${argv} ]] && die "No  argument given!"   #[[ -z ${argv} ]] && die "No  argument given!"
910    
911   confdir="$(dirname ${MCONFIG})"   confdir="$(dirname ${MCONFIG})"
912   if [[ ! -d ${prefix}/${confdir} ]]   if [[ ! -d ${prefix}/${confdir} ]]

Legend:
Removed from v.5114  
changed lines
  Added in v.5117