Magellan Linux

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

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

smage/branches/alx-0_6_0/include/alx.sminc revision 1672 by niro, Sun Jan 23 00:17:42 2011 UTC smage/trunk/include/alx.sminc revision 5462 by niro, Tue Mar 25 10:53:33 2014 UTC
# Line 4  Line 4 
4  # some global includes  # some global includes
5  sminclude cleanutils mtools  sminclude cleanutils mtools
6    
7  # all deprecated mage-targets  # include alx functions
8  DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx"  INHERITS="${INHERITS} alx"
   
 SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS REMOVE_DEPRECATED_MAGE_TARGETS"  
 SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall"  
   
 alx_postinstall()  
 {  
  local target  
   
  case ${REMOVE_DEPRECATED_MAGE_TARGETS} in  
  1|yes|true|TRUE)  
  for target in ${DEPRECATED_MAGE_TARGETS}  
  do  
  if [[ ! -z $(magequery -n ${PNAME}-${target}) ]]  
  then  
  echo "removing deprecated mage-target '${PNAME}-${target}'"  
  mage uninstall ${PNAME}-${target} || die  
  fi  
  done  
  ;;  
  esac  
 }  
9    
10  # injects files to given path (defaults to /usr/bin)  # injects files to given path (defaults to /usr/bin)
11  # mcinjectfile file {/path/to/dest}  # mcinjectfile file {/path/to/dest}
# Line 42  mcinjectfile() Line 21  mcinjectfile()
21   if [[ -z $2 ]]   if [[ -z $2 ]]
22   then   then
23   dest=/usr/bin   dest=/usr/bin
  install -d ${BINDIR}/${dest} || die  
24   fi   fi
25    
26     # needed directory
27     #minstalldir ${dest} || die
28    
29   # install our configfile   # install our configfile
30   install -m 0644 -o root -g root ${file} ${BINDIR}/${dest} || die   minstallfile ${file} ${dest} || die
31  }  }
32    
33  # injects executables to given path  # injects executables to given path
# Line 63  mcinjectexec() Line 44  mcinjectexec()
44   if [[ -z $2 ]]   if [[ -z $2 ]]
45   then   then
46   dest=/usr/bin   dest=/usr/bin
  install -d ${BINDIR}/${dest} || die  
47   fi   fi
48    
49     # needed directory
50     #minstalldir ${dest} || die
51    
52   # install our configfile   # install our configfile
53   install -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die   minstallexec ${file} ${dest} || die
54  }  }
55    
56  # injects a patch to the sourcecode  # injects a patch to the sourcecode
# Line 113  then Line 96  then
96  else  else
97   alx_old_mconfigure=alx_old$(typeset -f oldmconfigure)   alx_old_mconfigure=alx_old$(typeset -f oldmconfigure)
98  fi  fi
99  eval ${alx_old_mconfigure}  eval "${alx_old_mconfigure}"
100  mconfigure()  mconfigure()
101  {  {
102   local myconf   local myconf
# Line 149  mconfigure() Line 132  mconfigure()
132   done < ${configurefile}   done < ${configurefile}
133   fi   fi
134    
135   alx_oldmconfigure --disable-nls ${myconf} $@ ${ALX_CONFIGURE_OPTS} || die   alx_oldmconfigure ${myconf} $@ ${ALX_CONFIGURE_OPTS} || die
136  }  }
137    
138  # get custom mcore functions  # get custom mcore functions
# Line 162  then Line 145  then
145   echo -e "${COLBLUE}*** ${COLGREEN}Using custom build info from ${SMAGENAME%/*}/alx/${PNAME}.custom${COLDEFAULT}"   echo -e "${COLBLUE}*** ${COLGREEN}Using custom build info from ${SMAGENAME%/*}/alx/${PNAME}.custom${COLDEFAULT}"
146   source ${SMAGENAME%/*}/alx/${PNAME}.custom   source ${SMAGENAME%/*}/alx/${PNAME}.custom
147  fi  fi
   
 export_inherits postinstall  

Legend:
Removed from v.1672  
changed lines
  Added in v.5462