Magellan Linux

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

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

revision 1784 by niro, Mon Mar 12 23:27:53 2012 UTC revision 2043 by niro, Fri Feb 1 10:19:20 2013 UTC
# Line 409  else Line 409  else
409   split_info_${subpackage}   split_info_${subpackage}
410   if [[ ${PKGTYPE} = virtual ]]   if [[ ${PKGTYPE} = virtual ]]
411   then   then
412     echo
413     echo -en "${COLBLUE}*** ${COLDEFAULT}"
414     echo -en "Virtual package detected"
415     echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
416     echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
417    
418   echo "virtual package detected; nothing will be build ..."   echo "virtual package detected; nothing will be build ..."
419   # automatically set !pkgbuild here too   # automatically set !pkgbuild here too
420   msetfeature "!pkgbuild"   msetfeature "!pkgbuild"
# Line 423  else Line 429  else
429    
430   echo   echo
431   echo -en "${COLBLUE}*** ${COLDEFAULT}"   echo -en "${COLBLUE}*** ${COLDEFAULT}"
432   echo -en "  Running ${COLGREEN}split src_install()${COLDEFAULT}"   echo -en "Running ${COLGREEN}split src_install()${COLDEFAULT}"
433   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
434   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
435    
# Line 433  else Line 439  else
439   step_by_step src_install_${subpackage}   step_by_step src_install_${subpackage}
440   fi   fi
441   fi   fi
442     # restore smage environment
443     split_restore_variables
444   done   done
  # restore bindir & pname  
  split_restore_variables  
445   # unset all saved smage variables   # unset all saved smage variables
446   split_unset_variables   split_unset_variables
447   else   else
# Line 459  else Line 465  else
465   # compressing doc, info & man files   # compressing doc, info & man files
466   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
467   then   then
468     # save smage environment
469     split_save_variables
470   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
471   do   do
472   run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage}   # honor split_info
473   resume_stamp post-mcompressdoc_${subpackage}   split_info_${subpackage}
474     if [[ ${PKGTYPE} = virtual ]]
475     then
476     # automatically set !pkgbuild here too
477     msetfeature "!pkgbuild"
478     fi
479    
480     if mqueryfeature "!compressdoc"
481     then
482     echo -e "!compressdoc detected; documentation of '${subpackage}' will not be compressed ..."
483     elif mqueryfeature "!pkgbuild"
484     then
485     echo "!pkgbuild detected; skipping documentation compression for '${subpackage}' ..."
486     else
487     run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage}
488     resume_stamp post-mcompressdoc_${subpackage}
489     fi
490     # restore smage environment
491     split_restore_variables
492   done   done
493     # unset saved variables
494     split_unset_variables
495   else   else
496   run_resume post-mcompressdoc || mcompressdocs ${BINDIR}   run_resume post-mcompressdoc || mcompressdocs ${BINDIR}
497   resume_stamp post-mcompressdoc   resume_stamp post-mcompressdoc
# Line 478  then Line 506  then
506   else   else
507   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
508   then   then
509     # save smage environment
510     split_save_variables
511   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
512   do   do
513   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}"   # honor split_info
514   run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage}   split_info_${subpackage}
515   resume_stamp post-mstriplibtoolarchive_${subpackage}   if [[ ${PKGTYPE} = virtual ]]
516     then
517     # automatically set !pkgbuild here too
518     msetfeature "!pkgbuild"
519     fi
520    
521     if mqueryfeature "!libtool"
522     then
523     if mqueryfeature "!pkgbuild"
524     then
525     echo "!pkgbuild detected; skipping libtool archive stripping for '${subpackage}'..."
526     else
527     echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}"
528     run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage}
529     resume_stamp post-mstriplibtoolarchive_${subpackage}
530     fi
531     fi
532    
533     # restore smage environment
534     split_restore_variables
535   done   done
536     # unset saved variables
537     split_unset_variables
538   else   else
539   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}"
540   run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR}   run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR}
# Line 496  if mqueryfeature "purge" Line 547  if mqueryfeature "purge"
547  then  then
548   if mqueryfeature "!pkgbuild"   if mqueryfeature "!pkgbuild"
549   then   then
550   echo "!pkgbuild detected; skipping file purgation..."   echo "!pkgbuild detected; skipping file purgation ..."
551   else   else
552   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
553   then   then
554     # save smage environment
555     split_save_variables
556   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
557   do   do
558   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}"   # honor split_info
559   run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage}   split_info_${subpackage}
560   resume_stamp post-mpurgetargets_${subpackage}   if [[ ${PKGTYPE} = virtual ]]
561     then
562     # automatically set !pkgbuild here too
563     msetfeature "!pkgbuild"
564     fi
565    
566     if mqueryfeature "purge"
567     then
568     if mqueryfeature "!pkgbuild"
569     then
570     echo "!pkgbuild detected; skipping file purgation for '${subpackage}' ..."
571     else
572     echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}"
573     run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage}
574     resume_stamp post-mpurgetargets_${subpackage}
575     fi
576     fi
577    
578     # restore smage environment
579     split_restore_variables
580   done   done
581     # unset saved variables
582     split_unset_variables
583   else   else
584   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}"
585   run_resume post-mpurgetargets || mpurgetargets ${BINDIR}   run_resume post-mpurgetargets || mpurgetargets ${BINDIR}
# Line 517  fi Line 591  fi
591  # stripping all bins and libs  # stripping all bins and libs
592  if mqueryfeature "!strip"  if mqueryfeature "!strip"
593  then  then
594   echo -e "!strip detected; Package will not be stripped ..."   echo -e "!strip detected; package will not be stripped ..."
595  elif mqueryfeature "!pkgbuild"  elif mqueryfeature "!pkgbuild"
596  then  then
597   echo "!pkgbuild detected; skipping stripping of the package ..."   echo "!pkgbuild detected; skipping stripping of the package ..."
598  else  else
599   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
600   then   then
601     # save smage environment
602     split_save_variables
603   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
604   do   do
605   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"   # honor split_info
606   run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage}   split_info_${subpackage}
607   resume_stamp post-mstripbins_${subpackage}   if [[ ${PKGTYPE} = virtual ]]
608   echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}"   then
609   run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage}   # automatically set !pkgbuild here too
610   resume_stamp post-mstriplibs_${subpackage}   msetfeature "!pkgbuild"
611   echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}"   fi
612   run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage}  
613   resume_stamp post-mstripstatic_${subpackage}   if mqueryfeature "!strip"
614     then
615     echo -e "!strip detected; package '${subpackage}' will not be stripped ..."
616     elif mqueryfeature "!pkgbuild"
617     then
618     echo "!pkgbuild detected; skipping stripping of the package '${subpackage}' ..."
619     else
620     echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"
621     run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage}
622     resume_stamp post-mstripbins_${subpackage}
623     echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}"
624     run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage}
625     resume_stamp post-mstriplibs_${subpackage}
626     echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}"
627     run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage}
628     resume_stamp post-mstripstatic_${subpackage}
629     fi
630    
631     # restore smage environment
632     split_restore_variables
633   done   done
634     # unset saved variables
635     split_unset_variables
636   else   else
637   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"
638   run_resume post-mstripbins || mstripbins ${BINDIR}   run_resume post-mstripbins || mstripbins ${BINDIR}
# Line 599  else Line 696  else
696   PCAT="${PCATEGORIE}"   PCAT="${PCATEGORIE}"
697   unset PCATEGORIE   unset PCATEGORIE
698   fi   fi
699     if [[ ${PKGTYPE} = virtual ]]
700     then
701     # automatically set !pkgbuild here too
702     msetfeature "!pkgbuild"
703     fi
704    
705   # jump to next one if !pkgbuild is set in split_info   # jump to next one if !pkgbuild is set in split_info
706   mqueryfeature "!pkgbuild" && continue   if mqueryfeature "!pkgbuild"
707     then
708     # restore smage environment
709     split_restore_variables
710     continue
711     fi
712    
713   # check if an special subpackage_pkgbuild exists   # check if an special subpackage_pkgbuild exists
714   if typeset -f ${PNAME}_pkgbuild > /dev/null   if typeset -f ${PNAME}_pkgbuild > /dev/null

Legend:
Removed from v.1784  
changed lines
  Added in v.2043