Magellan Linux

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

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

revision 1592 by niro, Thu Dec 29 15:15:34 2011 UTC revision 1593 by niro, Thu Dec 29 15:20:20 2011 UTC
# Line 1440  fi Line 1440  fi
1440  [[ ! -d /var/log/smage ]] && install -d /var/log/smage  [[ ! -d /var/log/smage ]] && install -d /var/log/smage
1441  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log
1442    
1443  src_prepare | ${SMAGE_LOG_CMD}  if [[ ${PKGTYPE} = virtual ]]
 die_pipestatus 0 "src_prepare failed"  
 step_by_step $_  
   
 src_compile | ${SMAGE_LOG_CMD}  
 die_pipestatus 0 "src_compile failed"  
 step_by_step $_  
   
 # only run checks if requested  
 if mqueryfeature "!check"  
1444  then  then
1445   echo "!check detected; src_check() will not be run!" | ${SMAGE_LOG_CMD}   echo "virtual package detected; nothing will be build ..."
1446   step_by_step src_check   # automatically set !pkgbuild here too
1447     msetfeature "!pkgbuild"
1448  else  else
1449   src_check | ${SMAGE_LOG_CMD}   src_prepare | ${SMAGE_LOG_CMD}
1450   die_pipestatus 0 "src_check failed"   die_pipestatus 0 "src_prepare failed"
1451   step_by_step $_   step_by_step $_
 fi  
1452    
1453  # build several subpackages   src_compile | ${SMAGE_LOG_CMD}
1454  if [[ -n ${SPLIT_PACKAGES} ]]   die_pipestatus 0 "src_compile failed"
 then  
  # save bindir & pname  
  split_save_variables  
  export SAVED_BINDIR="${BINDIR}"  
  for subpackage in ${SPLIT_PACKAGES}  
  do  
  if typeset -f src_install_${subpackage} > /dev/null  
  then  
  # export subpackage bindir  
  export BINDIR="${SAVED_BINDIR}_${subpackage}"  
  # export PNAME, several internal function and include  
  # rely on this variable  
  export PNAME="${subpackage}"  
   
  echo  
  echo -en "${COLBLUE}*** ${COLDEFAULT}"  
  echo -en "  Running ${COLGREEN}split src_install()${COLDEFAULT}"  
  echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"  
  echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."  
   
  src_install_${subpackage} | ${SMAGE_LOG_CMD}  
  die_pipestatus 0 "src_install_${subpackage} failed"  
  step_by_step $_  
  fi  
  done  
  # restore bindir & pname  
  split_restore_variables  
  # unset all saved smage variables  
  split_unset_variables  
 else  
  src_install | ${SMAGE_LOG_CMD}  
  die_pipestatus 0 "src_install failed"  
1455   step_by_step $_   step_by_step $_
1456    
1457     # only run checks if requested
1458     if mqueryfeature "!check"
1459     then
1460     echo "!check detected; src_check() will not be run!" | ${SMAGE_LOG_CMD}
1461     step_by_step src_check
1462     else
1463     src_check | ${SMAGE_LOG_CMD}
1464     die_pipestatus 0 "src_check failed"
1465     step_by_step $_
1466     fi
1467    
1468     # build several subpackages
1469     if [[ -n ${SPLIT_PACKAGES} ]]
1470     then
1471     # save bindir & pname
1472     split_save_variables
1473     export SAVED_BINDIR="${BINDIR}"
1474     for subpackage in ${SPLIT_PACKAGES}
1475     do
1476     if typeset -f src_install_${subpackage} > /dev/null
1477     then
1478     # export subpackage bindir
1479     export BINDIR="${SAVED_BINDIR}_${subpackage}"
1480     # export PNAME, several internal function and include
1481     # rely on this variable
1482     export PNAME="${subpackage}"
1483    
1484     echo
1485     echo -en "${COLBLUE}*** ${COLDEFAULT}"
1486     echo -en "  Running ${COLGREEN}split src_install()${COLDEFAULT}"
1487     echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
1488     echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
1489    
1490     src_install_${subpackage} | ${SMAGE_LOG_CMD}
1491     die_pipestatus 0 "src_install_${subpackage} failed"
1492     step_by_step $_
1493     fi
1494     done
1495     # restore bindir & pname
1496     split_restore_variables
1497     # unset all saved smage variables
1498     split_unset_variables
1499     else
1500     src_install | ${SMAGE_LOG_CMD}
1501     die_pipestatus 0 "src_install failed"
1502     step_by_step $_
1503     fi
1504  fi  fi
1505    
1506    # echo for sake of good-looking
1507    echo
1508    
1509  if mqueryfeature "!compressdoc"  if mqueryfeature "!compressdoc"
1510  then  then
1511   echo -e "!compressdoc detected; documentation will not be compressed ..."   echo -e "!compressdoc detected; documentation will not be compressed ..."

Legend:
Removed from v.1592  
changed lines
  Added in v.1593