Magellan Linux

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

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

revision 2631 by niro, Mon Mar 10 12:15:30 2014 UTC revision 3035 by niro, Fri Jun 30 12:11:53 2017 UTC
# Line 300  fi Line 300  fi
300  smagesource ${SMAGENAME} || die "source failed"  smagesource ${SMAGENAME} || die "source failed"
301  PKGNAME="${PNAME}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}"  PKGNAME="${PNAME}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}"
302  MD5DIR="$(dirname ${SMAGENAME})/md5"  MD5DIR="$(dirname ${SMAGENAME})/md5"
303  SMAGE_LOG_CMD="tee -a /var/log/smage/${PKGNAME}.log"  SMAGE_LOG_CMD="tee -a ${SMAGELOGDIR}/${PKGNAME}.log"
304    
305  xtitle "Compiling ${PKGNAME}"  xtitle "Compiling ${PKGNAME}"
306  echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}"  echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}"
# Line 318  fi Line 318  fi
318  mqueryfeature "srcpkgtarball" || download_sources  mqueryfeature "srcpkgtarball" || download_sources
319    
320  # fixes some issues with these functions  # fixes some issues with these functions
321    export -f pkg_setup || die "pkg_setup export failed"
322  export -f src_prepare || die "src_prepare export failed"  export -f src_prepare || die "src_prepare export failed"
323  export -f src_compile || die "src_compile export failed"  export -f src_compile || die "src_compile export failed"
324  export -f src_check || die "src_check export failed"  export -f src_check || die "src_check export failed"
# Line 325  export -f src_install || die "src_instal Line 326  export -f src_install || die "src_instal
326    
327  # fixes some compile issues  # fixes some compile issues
328  export CHOST="${CHOST}" || die "CHOST export failed"  export CHOST="${CHOST}" || die "CHOST export failed"
329    export CPPFLAGS="${CPPFLAGS}" || die "CPPFLAGS export failed"
330  export CFLAGS="${CFLAGS}" || die "CFLAGS export failed"  export CFLAGS="${CFLAGS}" || die "CFLAGS export failed"
331  if [[ -z ${CXXFLAGS} ]]  if [[ -z ${CXXFLAGS} ]]
332  then  then
# Line 352  then Line 354  then
354   echo -e "${COLMAGENTA}Resume requested; continuing previous build${COLDEFAULT}"   echo -e "${COLMAGENTA}Resume requested; continuing previous build${COLDEFAULT}"
355    
356   # setup build logging   # setup build logging
357   [[ ! -d /var/log/smage ]] && install -d /var/log/smage   [[ ! -d ${SMAGELOGDIR} ]] && install -d ${SMAGELOGDIR}
358   if [[ -f /var/log/smage/${PKGNAME}.log.bz2 ]]   if [[ -f ${SMAGELOGDIR}/${PKGNAME}.log.bz2 ]]
359   then   then
360   bunzip2 -f /var/log/smage/${PKGNAME}.log.bz2   bunzip2 -f ${SMAGELOGDIR}/${PKGNAME}.log.bz2
361   fi   fi
362   echo -e "### Resume started on $(date) ###\n" >> /var/log/smage/${PKGNAME}.log   echo -e "### Resume started on $(date) ###\n" >> ${SMAGELOGDIR}/${PKGNAME}.log
363    
364  else  else
365   # clean up builddir if a previously one exist   # clean up builddir if a previously one exist
# Line 393  else Line 395  else
395   fi   fi
396    
397   # setup build logging   # setup build logging
398   [[ ! -d /var/log/smage ]] && install -d /var/log/smage   [[ ! -d ${SMAGELOGDIR} ]] && install -d ${SMAGELOGDIR}
399   echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log   echo -e "### Build started on $(date) ###\n" > ${SMAGELOGDIR}/${PKGNAME}.log
400  fi  fi
401    
402  if [[ ${PKGTYPE} = virtual ]]  if [[ ${PKGTYPE} = virtual ]]
# Line 403  then Line 405  then
405   # automatically set !pkgbuild here too   # automatically set !pkgbuild here too
406   msetfeature "!pkgbuild"   msetfeature "!pkgbuild"
407  else  else
408   ( run_resume src_prepare || src_prepare ) | ${SMAGE_LOG_CMD}   ( run_resume pkg_setup || pkg_setup ) |& ${SMAGE_LOG_CMD}
409     die_pipestatus 0 "pkg_setup failed"
410     resume_stamp pkg_setup
411     step_by_step pkg_setup
412    
413     ( run_resume src_prepare || src_prepare ) |& ${SMAGE_LOG_CMD}
414   die_pipestatus 0 "src_prepare failed"   die_pipestatus 0 "src_prepare failed"
415   resume_stamp src_prepare   resume_stamp src_prepare
416   step_by_step src_prepare   step_by_step src_prepare
417    
418   ( run_resume src_compile || src_compile ) | ${SMAGE_LOG_CMD}   ( run_resume src_compile || src_compile ) |& ${SMAGE_LOG_CMD}
419   die_pipestatus 0 "src_compile failed"   die_pipestatus 0 "src_compile failed"
420   resume_stamp src_compile   resume_stamp src_compile
421   step_by_step src_compile   step_by_step src_compile
# Line 416  else Line 423  else
423   # only run checks if requested   # only run checks if requested
424   if mqueryfeature "!check"   if mqueryfeature "!check"
425   then   then
426   echo "!check detected; src_check() will not be run!" | ${SMAGE_LOG_CMD}   echo "!check detected; src_check() will not be run!" |& ${SMAGE_LOG_CMD}
427   else   else
428   ( run_resume src_check || src_check ) | ${SMAGE_LOG_CMD}   ( run_resume src_check || src_check ) |& ${SMAGE_LOG_CMD}
429   die_pipestatus 0 "src_check failed"   die_pipestatus 0 "src_check failed"
430   resume_stamp src_check   resume_stamp src_check
431   fi   fi
# Line 459  else Line 466  else
466   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
467   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
468    
469   ( run_resume src_install_${subpackage} || src_install_${subpackage} ) | ${SMAGE_LOG_CMD}   ( run_resume src_install_${subpackage} || src_install_${subpackage} ) |& ${SMAGE_LOG_CMD}
470   die_pipestatus 0 "src_install_${subpackage} failed"   die_pipestatus 0 "src_install_${subpackage} failed"
471   resume_stamp src_install_${subpackage}   resume_stamp src_install_${subpackage}
472   step_by_step src_install_${subpackage}   step_by_step src_install_${subpackage}
# Line 471  else Line 478  else
478   # unset all saved smage variables   # unset all saved smage variables
479   split_unset_variables   split_unset_variables
480   else   else
481   ( run_resume src_install || src_install ) | ${SMAGE_LOG_CMD}   ( run_resume src_install || src_install ) |& ${SMAGE_LOG_CMD}
482   die_pipestatus 0 "src_install failed"   die_pipestatus 0 "src_install failed"
483   resume_stamp src_install   resume_stamp src_install
484   step_by_step src_install   step_by_step src_install
# Line 807  regen_mage_tree Line 814  regen_mage_tree
814    
815  if mqueryfeature "buildlog"  if mqueryfeature "buildlog"
816  then  then
817   bzip2 -9f /var/log/smage/${PKGNAME}.log   bzip2 -9f ${SMAGELOGDIR}/${PKGNAME}.log
818  else  else
819   [[ -f /var/log/smage/${PKGNAME}.log ]] && rm /var/log/smage/${PKGNAME}.log   [[ -f ${SMAGELOGDIR}/${PKGNAME}.log ]] && rm ${SMAGELOGDIR}/${PKGNAME}.log
820  fi  fi
821    
822  xtitleclean  xtitleclean

Legend:
Removed from v.2631  
changed lines
  Added in v.3035