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)" |
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} |
263 |
smagesource ${SMAGENAME} || die "source failed" |
smagesource ${SMAGENAME} || die "source failed" |
264 |
PKGNAME="${PNAME}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}" |
PKGNAME="${PNAME}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}" |
265 |
MD5DIR="$(dirname ${SMAGENAME})/md5" |
MD5DIR="$(dirname ${SMAGENAME})/md5" |
266 |
SMAGE_LOG_CMD="tee -a /var/log/smage/${PKGNAME}.log" |
SMAGE_LOG_CMD="tee -a ${SMAGELOGDIR}/${PKGNAME}.log" |
267 |
|
|
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} ]] |
281 |
mqueryfeature "srcpkgtarball" || download_sources |
mqueryfeature "srcpkgtarball" || download_sources |
282 |
|
|
283 |
# fixes some issues with these functions |
# fixes some issues with these functions |
284 |
|
export -f pkg_setup || die "pkg_setup export failed" |
285 |
export -f src_prepare || die "src_prepare export failed" |
export -f src_prepare || die "src_prepare export failed" |
286 |
export -f src_compile || die "src_compile export failed" |
export -f src_compile || die "src_compile export failed" |
287 |
export -f src_check || die "src_check export failed" |
export -f src_check || die "src_check export failed" |
304 |
# 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 |
305 |
mqueryfeature "distcc" && setup_distcc_environment |
mqueryfeature "distcc" && setup_distcc_environment |
306 |
|
|
307 |
|
# setup icecc |
308 |
|
# setup for icecc goes *before* ccache, so ccache comes before icecc in path |
309 |
|
mqueryfeature "icecc" && setup_icecc_environment |
310 |
|
|
311 |
# setup ccache |
# setup ccache |
312 |
mqueryfeature "ccache" && setup_ccache_environment |
mqueryfeature "ccache" && setup_ccache_environment |
313 |
|
|
316 |
echo -e "${COLMAGENTA}Resume requested; continuing previous build${COLDEFAULT}" |
echo -e "${COLMAGENTA}Resume requested; continuing previous build${COLDEFAULT}" |
317 |
|
|
318 |
# setup build logging |
# setup build logging |
319 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
[[ ! -d ${SMAGELOGDIR} ]] && install -d ${SMAGELOGDIR} |
320 |
if [[ -f /var/log/smage/${PKGNAME}.log.bz2 ]] |
if [[ -f ${SMAGELOGDIR}/${PKGNAME}.log.bz2 ]] |
321 |
then |
then |
322 |
bunzip2 -f /var/log/smage/${PKGNAME}.log.bz2 |
bunzip2 -f ${SMAGELOGDIR}/${PKGNAME}.log.bz2 |
323 |
fi |
fi |
324 |
echo -e "### Resume started on $(date) ###\n" >> /var/log/smage/${PKGNAME}.log |
echo -e "### Resume started on $(date) ###\n" >> ${SMAGELOGDIR}/${PKGNAME}.log |
325 |
|
|
326 |
else |
else |
327 |
# clean up builddir if a previously one exist |
# clean up builddir if a previously one exist |
357 |
fi |
fi |
358 |
|
|
359 |
# setup build logging |
# setup build logging |
360 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
[[ ! -d ${SMAGELOGDIR} ]] && install -d ${SMAGELOGDIR} |
361 |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
echo -e "### Build started on $(date) ###\n" > ${SMAGELOGDIR}/${PKGNAME}.log |
362 |
fi |
fi |
363 |
|
|
364 |
if [[ ${PKGTYPE} = virtual ]] |
if [[ ${PKGTYPE} = virtual ]] |
367 |
# automatically set !pkgbuild here too |
# automatically set !pkgbuild here too |
368 |
msetfeature "!pkgbuild" |
msetfeature "!pkgbuild" |
369 |
else |
else |
370 |
|
( run_resume pkg_setup || pkg_setup ) | ${SMAGE_LOG_CMD} |
371 |
|
die_pipestatus 0 "pkg_setup failed" |
372 |
|
resume_stamp pkg_setup |
373 |
|
step_by_step pkg_setup |
374 |
|
|
375 |
( run_resume src_prepare || src_prepare ) | ${SMAGE_LOG_CMD} |
( run_resume src_prepare || src_prepare ) | ${SMAGE_LOG_CMD} |
376 |
die_pipestatus 0 "src_prepare failed" |
die_pipestatus 0 "src_prepare failed" |
377 |
resume_stamp src_prepare |
resume_stamp src_prepare |
404 |
split_info_${subpackage} |
split_info_${subpackage} |
405 |
if [[ ${PKGTYPE} = virtual ]] |
if [[ ${PKGTYPE} = virtual ]] |
406 |
then |
then |
407 |
|
echo |
408 |
|
echo -en "${COLBLUE}*** ${COLDEFAULT}" |
409 |
|
echo -en "Virtual package detected" |
410 |
|
echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}" |
411 |
|
echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..." |
412 |
|
|
413 |
echo "virtual package detected; nothing will be build ..." |
echo "virtual package detected; nothing will be build ..." |
414 |
# automatically set !pkgbuild here too |
# automatically set !pkgbuild here too |
415 |
msetfeature "!pkgbuild" |
msetfeature "!pkgbuild" |
424 |
|
|
425 |
echo |
echo |
426 |
echo -en "${COLBLUE}*** ${COLDEFAULT}" |
echo -en "${COLBLUE}*** ${COLDEFAULT}" |
427 |
echo -en " Running ${COLGREEN}split src_install()${COLDEFAULT}" |
echo -en "Running ${COLGREEN}split src_install()${COLDEFAULT}" |
428 |
echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}" |
echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}" |
429 |
echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..." |
echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..." |
430 |
|
|
434 |
step_by_step src_install_${subpackage} |
step_by_step src_install_${subpackage} |
435 |
fi |
fi |
436 |
fi |
fi |
437 |
|
# restore smage environment |
438 |
|
split_restore_variables |
439 |
done |
done |
|
# restore bindir & pname |
|
|
split_restore_variables |
|
440 |
# unset all saved smage variables |
# unset all saved smage variables |
441 |
split_unset_variables |
split_unset_variables |
442 |
else |
else |
460 |
# compressing doc, info & man files |
# compressing doc, info & man files |
461 |
if [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
462 |
then |
then |
463 |
|
# save smage environment |
464 |
|
split_save_variables |
465 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
466 |
do |
do |
467 |
run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage} |
# honor split_info |
468 |
resume_stamp post-mcompressdoc_${subpackage} |
split_info_${subpackage} |
469 |
|
if [[ ${PKGTYPE} = virtual ]] |
470 |
|
then |
471 |
|
# automatically set !pkgbuild here too |
472 |
|
msetfeature "!pkgbuild" |
473 |
|
fi |
474 |
|
|
475 |
|
if mqueryfeature "!compressdoc" |
476 |
|
then |
477 |
|
echo -e "!compressdoc detected; documentation of '${subpackage}' will not be compressed ..." |
478 |
|
elif mqueryfeature "!pkgbuild" |
479 |
|
then |
480 |
|
echo "!pkgbuild detected; skipping documentation compression for '${subpackage}' ..." |
481 |
|
else |
482 |
|
run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage} |
483 |
|
resume_stamp post-mcompressdoc_${subpackage} |
484 |
|
fi |
485 |
|
# restore smage environment |
486 |
|
split_restore_variables |
487 |
done |
done |
488 |
|
# unset saved variables |
489 |
|
split_unset_variables |
490 |
else |
else |
491 |
run_resume post-mcompressdoc || mcompressdocs ${BINDIR} |
run_resume post-mcompressdoc || mcompressdocs ${BINDIR} |
492 |
resume_stamp post-mcompressdoc |
resume_stamp post-mcompressdoc |
501 |
else |
else |
502 |
if [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
503 |
then |
then |
504 |
|
# save smage environment |
505 |
|
split_save_variables |
506 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
507 |
do |
do |
508 |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}" |
# honor split_info |
509 |
run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage} |
split_info_${subpackage} |
510 |
resume_stamp post-mstriplibtoolarchive_${subpackage} |
if [[ ${PKGTYPE} = virtual ]] |
511 |
|
then |
512 |
|
# automatically set !pkgbuild here too |
513 |
|
msetfeature "!pkgbuild" |
514 |
|
fi |
515 |
|
|
516 |
|
if mqueryfeature "!libtool" |
517 |
|
then |
518 |
|
if mqueryfeature "!pkgbuild" |
519 |
|
then |
520 |
|
echo "!pkgbuild detected; skipping libtool archive stripping for '${subpackage}'..." |
521 |
|
else |
522 |
|
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}" |
523 |
|
run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage} |
524 |
|
resume_stamp post-mstriplibtoolarchive_${subpackage} |
525 |
|
fi |
526 |
|
fi |
527 |
|
|
528 |
|
# restore smage environment |
529 |
|
split_restore_variables |
530 |
done |
done |
531 |
|
# unset saved variables |
532 |
|
split_unset_variables |
533 |
else |
else |
534 |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}" |
535 |
run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR} |
run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR} |
542 |
then |
then |
543 |
if mqueryfeature "!pkgbuild" |
if mqueryfeature "!pkgbuild" |
544 |
then |
then |
545 |
echo "!pkgbuild detected; skipping file purgation..." |
echo "!pkgbuild detected; skipping file purgation ..." |
546 |
else |
else |
547 |
if [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
548 |
then |
then |
549 |
|
# save smage environment |
550 |
|
split_save_variables |
551 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
552 |
do |
do |
553 |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}" |
# honor split_info |
554 |
run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage} |
split_info_${subpackage} |
555 |
resume_stamp post-mpurgetargets_${subpackage} |
if [[ ${PKGTYPE} = virtual ]] |
556 |
|
then |
557 |
|
# automatically set !pkgbuild here too |
558 |
|
msetfeature "!pkgbuild" |
559 |
|
fi |
560 |
|
|
561 |
|
if mqueryfeature "purge" |
562 |
|
then |
563 |
|
if mqueryfeature "!pkgbuild" |
564 |
|
then |
565 |
|
echo "!pkgbuild detected; skipping file purgation for '${subpackage}' ..." |
566 |
|
else |
567 |
|
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}" |
568 |
|
run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage} |
569 |
|
resume_stamp post-mpurgetargets_${subpackage} |
570 |
|
fi |
571 |
|
fi |
572 |
|
|
573 |
|
# restore smage environment |
574 |
|
split_restore_variables |
575 |
done |
done |
576 |
|
# unset saved variables |
577 |
|
split_unset_variables |
578 |
else |
else |
579 |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}" |
580 |
run_resume post-mpurgetargets || mpurgetargets ${BINDIR} |
run_resume post-mpurgetargets || mpurgetargets ${BINDIR} |
586 |
# stripping all bins and libs |
# stripping all bins and libs |
587 |
if mqueryfeature "!strip" |
if mqueryfeature "!strip" |
588 |
then |
then |
589 |
echo -e "!strip detected; Package will not be stripped ..." |
echo -e "!strip detected; package will not be stripped ..." |
590 |
elif mqueryfeature "!pkgbuild" |
elif mqueryfeature "!pkgbuild" |
591 |
then |
then |
592 |
echo "!pkgbuild detected; skipping stripping of the package ..." |
echo "!pkgbuild detected; skipping stripping of the package ..." |
593 |
else |
else |
594 |
if [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
595 |
then |
then |
596 |
|
# save smage environment |
597 |
|
split_save_variables |
598 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
599 |
do |
do |
600 |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}" |
# honor split_info |
601 |
run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage} |
split_info_${subpackage} |
602 |
resume_stamp post-mstripbins_${subpackage} |
if [[ ${PKGTYPE} = virtual ]] |
603 |
echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}" |
then |
604 |
run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage} |
# automatically set !pkgbuild here too |
605 |
resume_stamp post-mstriplibs_${subpackage} |
msetfeature "!pkgbuild" |
606 |
echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}" |
fi |
607 |
run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage} |
|
608 |
resume_stamp post-mstripstatic_${subpackage} |
if mqueryfeature "!strip" |
609 |
|
then |
610 |
|
echo -e "!strip detected; package '${subpackage}' will not be stripped ..." |
611 |
|
elif mqueryfeature "!pkgbuild" |
612 |
|
then |
613 |
|
echo "!pkgbuild detected; skipping stripping of the package '${subpackage}' ..." |
614 |
|
else |
615 |
|
echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}" |
616 |
|
run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage} |
617 |
|
resume_stamp post-mstripbins_${subpackage} |
618 |
|
echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}" |
619 |
|
run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage} |
620 |
|
resume_stamp post-mstriplibs_${subpackage} |
621 |
|
echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}" |
622 |
|
run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage} |
623 |
|
resume_stamp post-mstripstatic_${subpackage} |
624 |
|
fi |
625 |
|
|
626 |
|
# restore smage environment |
627 |
|
split_restore_variables |
628 |
done |
done |
629 |
|
# unset saved variables |
630 |
|
split_unset_variables |
631 |
else |
else |
632 |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}" |
633 |
run_resume post-mstripbins || mstripbins ${BINDIR} |
run_resume post-mstripbins || mstripbins ${BINDIR} |
641 |
fi |
fi |
642 |
fi |
fi |
643 |
|
|
644 |
if mqueryfeature "!pkgbuild" |
if mqueryfeature "qalint" |
645 |
then |
then |
646 |
echo -e "!pkgbuild detected; Package will not be build ..." |
if mqueryfeature "!pkgbuild" |
647 |
else |
then |
648 |
# build several targets |
echo "!pkgbuild detected; skipping QA lint checks ..." |
649 |
if [[ -n ${MAGE_TARGETS} ]] |
else |
650 |
|
if [[ -n ${SPLIT_PACKAGES} ]] |
651 |
then |
then |
652 |
for target in ${MAGE_TARGETS} |
# save smage environment |
653 |
|
split_save_variables |
654 |
|
for subpackage in ${SPLIT_PACKAGES} |
655 |
do |
do |
656 |
# check if a special target_pkgbuild exists |
# honor split_info |
657 |
if typeset -f ${target}_pkgbuild > /dev/null |
split_info_${subpackage} |
658 |
|
if [[ ${PKGTYPE} = virtual ]] |
659 |
then |
then |
660 |
# run it |
# automatically set !pkgbuild here too |
661 |
run_resume post-${target}_pkgbuild || ${target}_pkgbuild |
msetfeature "!pkgbuild" |
|
resume_stamp post-${target}_pkgbuild |
|
662 |
fi |
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} |
|
663 |
|
|
664 |
# build pkg-md5-sum if requested |
if mqueryfeature "qalint" |
665 |
run_resume post-md5sum_${target} || generate_package_md5sum \ |
then |
666 |
--pcat "${PCAT}" \ |
if mqueryfeature "!pkgbuild" |
667 |
--pname "${PNAME}" \ |
then |
668 |
--pver "${PVER}" \ |
echo "!pkgbuild detected; skipping QA lint checks for '${subpackage}' ..." |
669 |
--pbuild "${PBUILD}" \ |
else |
670 |
--parch "${ARCH}" \ |
echo -e "${COLBLUE}===${COLGREEN} running QA lint checks for '${subpackage}' ...${COLDEFAULT}" |
671 |
--target "${target}" |
mqalint ${BINDIR}_${subpackage} |
672 |
resume_stamp post-md5sum_${target} |
fi |
673 |
|
fi |
674 |
|
|
675 |
echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD} successfully builded.\n${COLDEFAULT}" |
# restore smage environment |
676 |
|
split_restore_variables |
677 |
done |
done |
678 |
|
# unset saved variables |
679 |
|
split_unset_variables |
680 |
|
else |
681 |
|
echo -e "${COLBLUE}===${COLGREEN} running QA lint checks ...${COLDEFAULT}" |
682 |
|
mqalint ${BINDIR} |
683 |
|
fi |
684 |
|
fi |
685 |
|
fi |
686 |
|
|
687 |
|
if mqueryfeature "!pkgbuild" |
688 |
|
then |
689 |
|
echo -e "!pkgbuild detected; Package will not be build ..." |
690 |
|
else |
691 |
# build several subpackages |
# build several subpackages |
692 |
elif [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
693 |
then |
then |
694 |
split_save_variables |
split_save_variables |
695 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
703 |
PCAT="${PCATEGORIE}" |
PCAT="${PCATEGORIE}" |
704 |
unset PCATEGORIE |
unset PCATEGORIE |
705 |
fi |
fi |
706 |
|
if [[ ${PKGTYPE} = virtual ]] |
707 |
|
then |
708 |
|
# automatically set !pkgbuild here too |
709 |
|
msetfeature "!pkgbuild" |
710 |
|
fi |
711 |
|
|
712 |
# jump to next one if !pkgbuild is set in split_info |
# jump to next one if !pkgbuild is set in split_info |
713 |
mqueryfeature "!pkgbuild" && continue |
if mqueryfeature "!pkgbuild" |
714 |
|
then |
715 |
|
# restore smage environment |
716 |
|
split_restore_variables |
717 |
|
continue |
718 |
|
fi |
719 |
|
|
720 |
# check if an special subpackage_pkgbuild exists |
# check if an special subpackage_pkgbuild exists |
721 |
if typeset -f ${PNAME}_pkgbuild > /dev/null |
if typeset -f ${PNAME}_pkgbuild > /dev/null |
771 |
fi |
fi |
772 |
fi |
fi |
773 |
|
|
774 |
|
# auto regen mage tree if requested |
775 |
|
regen_mage_tree |
776 |
|
|
777 |
if mqueryfeature "buildlog" |
if mqueryfeature "buildlog" |
778 |
then |
then |
779 |
bzip2 -9f /var/log/smage/${PKGNAME}.log |
bzip2 -9f ${SMAGELOGDIR}/${PKGNAME}.log |
780 |
else |
else |
781 |
[[ -f /var/log/smage/${PKGNAME}.log ]] && rm /var/log/smage/${PKGNAME}.log |
[[ -f ${SMAGELOGDIR}/${PKGNAME}.log ]] && rm ${SMAGELOGDIR}/${PKGNAME}.log |
782 |
fi |
fi |
783 |
|
|
784 |
xtitleclean |
xtitleclean |