Magellan Linux

Diff of /smage/trunk/include/mtools.sminc

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

revision 5113 by niro, Tue Sep 24 09:01:24 2013 UTC revision 5114 by niro, Tue Sep 24 09:03:16 2013 UTC
# Line 1  Line 1 
1  # $Id$  # $Header: /magellan-cvs/smage/include/mtools.sminc,v 1.39 2008/04/20 08:28:23 niro Exp $
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't support 'ln -v'   # check for busybox as it doesn'tz 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   # prefer scanelf   # create libtool symlinks
620   if [[ -x $(type -P scanelf) ]]   # 1. - library.so.1.0.0 -> library.so.1.0
621     if [ "${file%.*}" != *.so ]
622   then   then
623   local soname="$(scanelf -qBF '%S#p' ${file})"   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})
624   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/${soname} || die   fi
625   else   # 2. - library.so.1.0.0 -> library.so.1
626   echo -e "${COLYELLOW}minstalllib(): Warning: scanelf not found, using fallback symlink method${COLDEFAULT}"   if [ "${file%.*.*}" != *.so ]
627     then
628   # create libtool symlinks   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})
  # 1. - library.so.1.0.0 -> library.so.1.0  
  if [ "${file%.*}" != *.so ]  
  then  
  ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*}) || die  
  fi  
  # 2. - library.so.1.0.0 -> library.so.1  
  if [ "${file%.*.*}" != *.so ]  
  then  
  ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*}) || die  
  fi  
  # 3. - library.so.1.0.0.0 -> library.so.1  
  if [ "${file%.*.*.*}" != *.so ]  
  then  
  ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*.*}) || die  
  fi  
629   fi   fi
630  }  }
631    
# Line 683  mdelete() Line 669  mdelete()
669   local dest="$1"   local dest="$1"
670   local opts   local opts
671    
  # enforce  
  if [[ $1 = -f ]]  
  then  
  opts="-f"  
  dest="$2"  
  fi  
   
672   # recursive   # recursive
673   if [[ $1 = -r ]] || [[ $1 = -R ]]   if [[ $1 = -r ]] || [[ $1 = -R ]]
674   then   then
# Line 906  maddconfig() Line 885  maddconfig()
885   -b|--no-bindir) prefix=""; argv="$2" ;;   -b|--no-bindir) prefix=""; argv="$2" ;;
886   esac   esac
887    
888   #[[ -z ${argv} ]] && die "No  argument given!"   [[ -z ${argv} ]] && die "No  argument given!"
889    
890   confdir="$(dirname ${MCONFIG})"   confdir="$(dirname ${MCONFIG})"
891   if [[ ! -d ${prefix}/${confdir} ]]   if [[ ! -d ${prefix}/${confdir} ]]

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