Magellan Linux

Diff of /trunk/mage/usr/lib/mage/smage2.sh

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

revision 2157 by niro, Wed Aug 14 07:38:37 2013 UTC revision 2589 by niro, Fri Feb 14 09:00:35 2014 UTC
# Line 18  source ${MAGERC} Line 18  source ${MAGERC}
18  source ${MLIBDIR}/mage4.functions.sh  source ${MLIBDIR}/mage4.functions.sh
19  source ${MLIBDIR}/smage2.functions.sh  source ${MLIBDIR}/smage2.functions.sh
20    
21    # export default path
22    export PATH="${PATH}:${MLIBDIR}"
23    
24  ## setup ##  ## setup ##
25  SMAGENAME="$1"  SMAGENAME="$1"
26  SMAGEVERSION="$(< ${MLIBDIR}/version)"  SMAGEVERSION="$(< ${MLIBDIR}/version)"
# Line 154  then Line 157  then
157    
158   regen_mage_tree   regen_mage_tree
159    
  # build several targets  
  if [[ -n ${MAGE_TARGETS} ]]  
  then  
  for target in ${MAGE_TARGETS}  
  do  
  # build md5sum for existing packages  
  generate_package_md5sum \  
  --pcat "${PCAT}" \  
  --pname "${PNAME}" \  
  --pver "${PVER}" \  
  --pbuild "${PBUILD}" \  
  --parch "${ARCH}" \  
  --target "${target}"  
  done  
   
160   # build several subpackages   # build several subpackages
161   elif [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
162   then   then
163   split_save_variables   split_save_variables
164   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
# Line 280  SMAGE_LOG_CMD="tee -a /var/log/smage/${P Line 268  SMAGE_LOG_CMD="tee -a /var/log/smage/${P
268  xtitle "Compiling ${PKGNAME}"  xtitle "Compiling ${PKGNAME}"
269  echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}"  echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}"
270    
 # auto regen mage tree if requested  
 regen_mage_tree  
   
271  if mqueryfeature "srcpkgbuild"  if mqueryfeature "srcpkgbuild"
272  then  then
273   if [[ -d ${SOURCEDIR}/${PNAME} ]]   if [[ -d ${SOURCEDIR}/${PNAME} ]]
# Line 318  export MAKEOPTS="${MAKEOPTS}" || die "MA Line 303  export MAKEOPTS="${MAKEOPTS}" || die "MA
303  # setup for distcc goes *before* ccache, so ccache comes before distcc in path  # setup for distcc goes *before* ccache, so ccache comes before distcc in path
304  mqueryfeature "distcc" && setup_distcc_environment  mqueryfeature "distcc" && setup_distcc_environment
305    
306    # setup icecc
307    # setup for icecc goes *before* ccache, so ccache comes before icecc in path
308    mqueryfeature "icecc" && setup_icecc_environment
309    
310  # setup ccache  # setup ccache
311  mqueryfeature "ccache" && setup_ccache_environment  mqueryfeature "ccache" && setup_ccache_environment
312    
# Line 693  if mqueryfeature "!pkgbuild" Line 682  if mqueryfeature "!pkgbuild"
682  then  then
683   echo -e "!pkgbuild detected; Package will not be build ..."   echo -e "!pkgbuild detected; Package will not be build ..."
684  else  else
  # build several targets  
  if [[ -n ${MAGE_TARGETS} ]]  
  then  
  for target in ${MAGE_TARGETS}  
  do  
  # check if a special target_pkgbuild exists  
  if typeset -f ${target}_pkgbuild > /dev/null  
  then  
  # run it  
  run_resume post-${target}_pkgbuild || ${target}_pkgbuild  
  resume_stamp post-${target}_pkgbuild  
  fi  
  # now create the target package  
  run_resume post-pkg_builddir_${target} || ${MLIBDIR}/pkgbuild_dir.sh \  
  "${PNAME}-${target}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}" \  
  ${BINDIR} || die "target: ${target} package-build failed"  
  resume_stamp post-pkg_builddir_${target}  
   
  # build pkg-md5-sum if requested  
  run_resume post-md5sum_${target} || generate_package_md5sum \  
  --pcat "${PCAT}" \  
  --pname "${PNAME}" \  
  --pver "${PVER}" \  
  --pbuild "${PBUILD}" \  
  --parch "${ARCH}" \  
  --target "${target}"  
  resume_stamp post-md5sum_${target}  
   
  echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD} successfully builded.\n${COLDEFAULT}"  
  done  
   
685   # build several subpackages   # build several subpackages
686   elif [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
687   then   then
688   split_save_variables   split_save_variables
689   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
# Line 807  else Line 765  else
765   fi   fi
766  fi  fi
767    
768    # auto regen mage tree if requested
769    regen_mage_tree
770    
771  if mqueryfeature "buildlog"  if mqueryfeature "buildlog"
772  then  then
773   bzip2 -9f /var/log/smage/${PKGNAME}.log   bzip2 -9f /var/log/smage/${PKGNAME}.log

Legend:
Removed from v.2157  
changed lines
  Added in v.2589