Magellan Linux

Diff of /branches/mage-next/src/smage2.in

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

revision 1572 by niro, Wed Dec 28 10:31:45 2011 UTC revision 1577 by niro, Wed Dec 28 10:51:52 2011 UTC
# Line 321  download_sources() Line 321  download_sources()
321   unset SRC_URI   unset SRC_URI
322  }  }
323    
324  # dummy function, used if that not exist in smage file  # dummy function, used if that does not exist in smage file
325  src_prepare()  src_prepare()
326  {  {
327   echo "no src_prepare defined"   echo "no src_prepare defined"
  sleep 2  
328   return 0   return 0
329  }  }
330    
331  # dummy function, used if that not exist in smage file  # dummy function, used if that does not exist in smage file
332  src_compile()  src_compile()
333  {  {
334   echo "no src_compile defined"   echo "no src_compile defined"
  sleep 2  
335   return 0   return 0
336  }  }
337    
338  # dummy function, used if that not exist in smage file  # dummy function, used if that does not exist in smage file
339    src_check()
340    {
341     echo "no src_check defined"
342     return 0
343    }
344    
345    # dummy function, used if that does not exist in smage file
346  src_install()  src_install()
347  {  {
348   echo "no src_install defined"   echo "no src_install defined"
  sleep 2  
349   return 0   return 0
350  }  }
351    
# Line 1447  fi Line 1451  fi
1451  # fixes some issues with these functions  # fixes some issues with these functions
1452  export -f src_prepare || die "src_prepare export failed"  export -f src_prepare || die "src_prepare export failed"
1453  export -f src_compile || die "src_compile export failed"  export -f src_compile || die "src_compile export failed"
1454    export -f src_check || die "src_check export failed"
1455  export -f src_install || die "src_install export failed"  export -f src_install || die "src_install export failed"
1456    
1457  # fixes some compile issues  # fixes some compile issues
# Line 1464  export MAKEOPTS="${MAKEOPTS}" || die "MA Line 1469  export MAKEOPTS="${MAKEOPTS}" || die "MA
1469  # setup ccache  # setup ccache
1470  [[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment  [[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment
1471    
1472  # small sleep to show our settings  # clean up builddir if a previously one exist
 sleep 1  
   
 # cleans up build if a previously one exists  
1473  if [ -d ${BUILDDIR} ]  if [ -d ${BUILDDIR} ]
1474  then  then
1475   rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR."   rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR."
1476  fi  fi
1477  install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR."  install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR."
1478    
1479  # cleans up srcdir if a previously unpacked one exists  # clean up srcdir if a previously unpacked one exist
1480  if [ -d ${SRCDIR} ]  if [ -d ${SRCDIR} ]
1481  then  then
1482   rm -rf ${SRCDIR}   rm -rf ${SRCDIR}
1483  fi  fi
1484    
1485  # cleans up bindir if a previous build exists or creates a new one  # clean up bindir if a previous build exist or create a new one
1486  if [ -d ${BINDIR} ]  if [ -d ${BINDIR} ]
1487  then  then
1488   rm -rf ${BINDIR}   rm -rf ${BINDIR}
# Line 1493  then Line 1495  then
1495   rm -rf ${BUILDDIR}/${PKGNAME}   rm -rf ${BUILDDIR}/${PKGNAME}
1496  fi  fi
1497    
1498  # cleans up timestamp if one exists  # setup build logging
 if [ -f /var/tmp/timestamp ]  
 then  
  mage rmstamp  
 fi  
   
 # setup build loggins  
1499  [[ ! -d /var/log/smage ]] && install -d /var/log/smage  [[ ! -d /var/log/smage ]] && install -d /var/log/smage
1500  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log
1501    
# Line 1511  src_compile | ${SMAGE_LOG_CMD} Line 1507  src_compile | ${SMAGE_LOG_CMD}
1507  die_pipestatus 0 "src_compile failed"  die_pipestatus 0 "src_compile failed"
1508  step_by_step $_  step_by_step $_
1509    
1510    # only run checks if requested
1511    if [[ ${MAGE_CHECK} != true ]]
1512    then
1513     echo "MAGE_CHECK not requested; src_check() will not be run!" | ${SMAGE_LOG_CMD}
1514     step_by_step src_check
1515    else
1516     src_check | ${SMAGE_LOG_CMD}
1517     die_pipestatus 0 "src_check failed"
1518     step_by_step $_
1519    fi
1520    
1521  # build several subpackages  # build several subpackages
1522  if [[ -n ${SPLIT_PACKAGES} ]]  if [[ -n ${SPLIT_PACKAGES} ]]
1523  then  then
# Line 1599  case ${NOPKGBUILD} in Line 1606  case ${NOPKGBUILD} in
1606   then   then
1607   for target in ${MAGE_TARGETS}   for target in ${MAGE_TARGETS}
1608   do   do
1609   # check if an special target_pkgbuild exists   # check if a special target_pkgbuild exists
1610   if typeset -f ${target}_pkgbuild > /dev/null   if typeset -f ${target}_pkgbuild > /dev/null
1611   then   then
1612   # run it   # run it

Legend:
Removed from v.1572  
changed lines
  Added in v.1577