Magellan Linux

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

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

revision 1593 by niro, Thu Dec 29 15:20:20 2011 UTC revision 1621 by niro, Tue Jan 10 15:48:33 2012 UTC
# Line 177  download_sources() Line 177  download_sources()
177   fi   fi
178    
179   echo -e "${COLBLUE}==>${COLGREEN} fetching ${uri}${COLDEFAULT}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${uri}${COLDEFAULT}"
180   mdownload --uri "${uri}" --dir "${outputdir}" || die "Could not download '${uri}'"   # do not die here, mchecksum catches download errors
181     mdownload --uri "${uri}" --dir "${outputdir}"
182    
183   # unset them to be sure   # unset them to be sure
184   unset uri   unset uri
# Line 236  mlibdir() Line 237  mlibdir()
237    
238  mconfigure()  mconfigure()
239  {  {
240     local myopts
241     if [[ ! -z ${CTARGET} ]]
242     then
243     myopts="--target=${CTARGET}"
244     fi
245    
246   if [ -x ./configure ]   if [ -x ./configure ]
247   then   then
248   ./configure \   ./configure \
# Line 248  mconfigure() Line 255  mconfigure()
255   --sysconfdir=/etc \   --sysconfdir=/etc \
256   --localstatedir=/var/lib \   --localstatedir=/var/lib \
257   --libdir=/usr/$(mlibdir) \   --libdir=/usr/$(mlibdir) \
258     ${myopts} \
259   "$@" || die "mconfigure failed"   "$@" || die "mconfigure failed"
260   else   else
261   echo "configure is not an executable ..."   echo "configure is not an executable ..."
# Line 343  munpack() Line 351  munpack()
351   rar)   rar)
352   unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST}  || die ".rar unpack failed."   unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST}  || die ".rar unpack failed."
353   ;;   ;;
354   zip|xpi)   zip|xpi|jar)
355   unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed."   unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed."
356   ;;   ;;
357   rpm)   rpm)
# Line 423  minstalldocs() Line 431  minstalldocs()
431   then   then
432   if mqueryfeature "compressdoc"   if mqueryfeature "compressdoc"
433   then   then
434   cat ${doc} | gzip -9c > ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/${doc}.gz || die "gzipping +installing ${doc}."   cat ${doc} | gzip -9c > ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "gzipping +installing ${doc}."
435   chmod 0644 ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/${doc}.gz || die "fixing permissions of ${doc}."   chmod 0644 ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "fixing permissions of ${doc}."
436   else   else
437   install -m 0644 ${SRCDIR}/${i} ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "installing ${doc}."   install -m 0644 ${SRCDIR}/${i} ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "installing ${doc}."
438   fi   fi
# Line 464  mstriplibtoolarchive() Line 472  mstriplibtoolarchive()
472   local stripdir="$@"   local stripdir="$@"
473    
474   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"
475   find ${stripdir} ! -type d -name \*.la | xargs file | grep "libtool library" | cut -f 1 -d : | xargs --no-run-if-empty rm -f -- 2> /dev/null   find ${stripdir} ! -type d -name \*.la | xargs | grep "libtool library" | cut -f 1 -d : | xargs --no-run-if-empty rm -f -- 2> /dev/null
476  }  }
477    
478  mpurgetargets()  mpurgetargets()
# Line 793  regen_mage_tree() Line 801  regen_mage_tree()
801   unset STATE   unset STATE
802   unset DESCRIPTION   unset DESCRIPTION
803   unset HOMEPAGE   unset HOMEPAGE
804   unset PKGTYPE   # unset PKGTYPE <-- don't do that either; smage needs this var
805   unset INHERITS   unset INHERITS
806   unset DEPEND   unset DEPEND
807   unset SDEPEND   unset SDEPEND
# Line 898  split_restore_variables() Line 906  split_restore_variables()
906    
907   # special handling needed for mage features   # special handling needed for mage features
908   # pkgbuild   # pkgbuild
909   msetfeature "${SAVED_FEATURE_PKGBUILD}"   FVERBOSE=off msetfeature "${SAVED_FEATURE_PKGBUILD}"
910   # strip   # strip
911   msetfeature "${SAVED_FEATURE_STRIP}"   FVERBOSE=off msetfeature "${SAVED_FEATURE_STRIP}"
912   # libtool   # libtool
913   msetfeature "${SAVED_FEATURE_LIBTOOL}"   FVERBOSE=off msetfeature "${SAVED_FEATURE_LIBTOOL}"
914   # compressdoc   # compressdoc
915   msetfeature "${SAVED_FEATURE_COMPRESSDOC}"   FVERBOSE=off msetfeature "${SAVED_FEATURE_COMPRESSDOC}"
916    
917   # bindir too   # bindir too
918   export BINDIR="${SAVED_BINDIR}"   export BINDIR="${SAVED_BINDIR}"
# Line 1135  step_by_step() Line 1143  step_by_step()
1143   fi   fi
1144  }  }
1145    
1146    resume_stamp()
1147    {
1148     local step="$1"
1149     [[ ! -d ${BUILDDIR}/.stamps ]] && install -d ${BUILDDIR}/.stamps
1150     touch ${BUILDDIR}/.stamps/smage-${PKGNAME}-${step}
1151    }
1152    
1153    run_resume()
1154    {
1155     local step="$1"
1156    
1157     if mqueryfeature "resume" && [[ -f ${BUILDDIR}/.stamps/smage-${PKGNAME}-${step} ]]
1158     then
1159     echo -e "${COLMAGENTA}${step} already processed; doing nothing${COLDEFAULT}"
1160     return 0
1161     else
1162     return 1
1163     fi
1164    }
1165    
1166  # print out our version  # print out our version
1167  showversion  showversion
# Line 1355  then Line 1382  then
1382   [[ ! -f ${SMAGENAME} ]] && die "Included smage2 file in src-tarball not found: ${SMAGENAME}"   [[ ! -f ${SMAGENAME} ]] && die "Included smage2 file in src-tarball not found: ${SMAGENAME}"
1383  fi  fi
1384    
1385    if [ "$1" == "--resume" -a -n "$2" ]
1386    then
1387     msetfeature "resume"
1388     SMAGENAME="$2"
1389    fi
1390    
1391  [ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] && die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting."  [ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] && die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting."
1392  [ -z "$(basename ${SMAGENAME} | grep .${SMAGESUFFIX})" ] &&  [ -z "$(basename ${SMAGENAME} | grep .${SMAGESUFFIX})" ] &&
# Line 1399  export -f src_install || die "src_instal Line 1431  export -f src_install || die "src_instal
1431  # fixes some compile issues  # fixes some compile issues
1432  export CHOST="${CHOST}" || die "CHOST export failed"  export CHOST="${CHOST}" || die "CHOST export failed"
1433  export CFLAGS="${CFLAGS}" || die "CFLAGS export failed"  export CFLAGS="${CFLAGS}" || die "CFLAGS export failed"
1434  export CXXFLAGS="${CFLAGS}" || die "CXXFLAGS export failed"  if [[ -z ${CXXFLAGS} ]]
1435    then
1436     export CXXFLAGS="${CFLAGS}" || die "CXXFLAGS export failed"
1437    else
1438     export CXXFLAGS="${CXXFLAGS}" || die "CXXFLAGS export failed"
1439    fi
1440    export LDFLAGS="${LDFLAGS}" || die "LDFLAGS export failed"
1441  export BINDIR="${BINDIR}" || die "BINDIR export failed"  export BINDIR="${BINDIR}" || die "BINDIR export failed"
1442  export MAKEOPTS="${MAKEOPTS}" || die "MAKEOPTS export failed"  export MAKEOPTS="${MAKEOPTS}" || die "MAKEOPTS export failed"
1443    
# Line 1410  mqueryfeature "distcc" && setup_distcc_e Line 1448  mqueryfeature "distcc" && setup_distcc_e
1448  # setup ccache  # setup ccache
1449  mqueryfeature "ccache" && setup_ccache_environment  mqueryfeature "ccache" && setup_ccache_environment
1450    
1451  # clean up builddir if a previously one exist  if mqueryfeature "resume"
 if [ -d ${BUILDDIR} ]  
1452  then  then
1453   rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR."   echo -e "${COLMAGENTA}Resume requested; continuing previous build${COLDEFAULT}"
 fi  
 install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR."  
1454    
1455  # clean up srcdir if a previously unpacked one exist   # setup build logging
1456  if [ -d ${SRCDIR} ]   [[ ! -d /var/log/smage ]] && install -d /var/log/smage
1457  then   if [[ -f /var/log/smage/${PKGNAME}.log.bz2 ]]
1458   rm -rf ${SRCDIR}   then
1459  fi   bunzip2 -f /var/log/smage/${PKGNAME}.log.bz2
1460     fi
1461     echo -e "### Resume started on $(date) ###\n" >> /var/log/smage/${PKGNAME}.log
1462    
1463  # clean up bindir if a previous build exist or create a new one  else
1464  if [ -d ${BINDIR} ]   # clean up builddir if a previously one exist
1465  then   if [ -d ${BUILDDIR} ]
1466   rm -rf ${BINDIR}   then
1467  fi   rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR."
1468  install -d ${BINDIR} || die "couldn't create \$BINDIR."   fi
1469     install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR."
1470    
1471  # clean up package temp dir if a previous build exist   # clean up srcdir if a previously unpacked one exist
1472  if [ -d ${BUILDDIR}/${PKGNAME} ]   if [ -d ${SRCDIR} ]
1473  then   then
1474   rm -rf ${BUILDDIR}/${PKGNAME}   rm -rf ${SRCDIR}
1475  fi   fi
1476    
1477     # clean up bindir if a previous build exist or create a new one
1478     if [ -d ${BINDIR} ]
1479     then
1480     rm -rf ${BINDIR}
1481     fi
1482     install -d ${BINDIR} || die "couldn't create \$BINDIR."
1483    
1484     # clean up package temp dir if a previous build exist
1485     if [ -d ${BUILDDIR}/${PKGNAME} ]
1486     then
1487     rm -rf ${BUILDDIR}/${PKGNAME}
1488     fi
1489    
1490  # setup build logging   # clean up stamps dir
1491  [[ ! -d /var/log/smage ]] && install -d /var/log/smage   if [ -d ${BUILDDIR}/.stamps ]
1492  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log   then
1493     rm -rf ${BUILDDIR}/.stamps
1494     fi
1495    
1496     # setup build logging
1497     [[ ! -d /var/log/smage ]] && install -d /var/log/smage
1498     echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log
1499    fi
1500    
1501  if [[ ${PKGTYPE} = virtual ]]  if [[ ${PKGTYPE} = virtual ]]
1502  then  then
# Line 1446  then Line 1504  then
1504   # automatically set !pkgbuild here too   # automatically set !pkgbuild here too
1505   msetfeature "!pkgbuild"   msetfeature "!pkgbuild"
1506  else  else
1507   src_prepare | ${SMAGE_LOG_CMD}   ( run_resume src_prepare || src_prepare ) | ${SMAGE_LOG_CMD}
1508   die_pipestatus 0 "src_prepare failed"   die_pipestatus 0 "src_prepare failed"
1509   step_by_step $_   resume_stamp src_prepare
1510     step_by_step src_prepare
1511    
1512   src_compile | ${SMAGE_LOG_CMD}   ( run_resume src_compile || src_compile ) | ${SMAGE_LOG_CMD}
1513   die_pipestatus 0 "src_compile failed"   die_pipestatus 0 "src_compile failed"
1514   step_by_step $_   resume_stamp src_compile
1515     step_by_step src_compile
1516    
1517   # only run checks if requested   # only run checks if requested
1518   if mqueryfeature "!check"   if mqueryfeature "!check"
1519   then   then
1520   echo "!check detected; src_check() will not be run!" | ${SMAGE_LOG_CMD}   echo "!check detected; src_check() will not be run!" | ${SMAGE_LOG_CMD}
  step_by_step src_check  
1521   else   else
1522   src_check | ${SMAGE_LOG_CMD}   ( run_resume src_check || src_check ) | ${SMAGE_LOG_CMD}
1523   die_pipestatus 0 "src_check failed"   die_pipestatus 0 "src_check failed"
1524   step_by_step $_   resume_stamp src_check
1525   fi   fi
1526     step_by_step src_check
1527    
1528   # build several subpackages   # build several subpackages
1529   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
# Line 1487  else Line 1547  else
1547   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"   echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}"
1548   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."   echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..."
1549    
1550   src_install_${subpackage} | ${SMAGE_LOG_CMD}   ( run_resume src_install_${subpackage} || src_install_${subpackage} ) | ${SMAGE_LOG_CMD}
1551   die_pipestatus 0 "src_install_${subpackage} failed"   die_pipestatus 0 "src_install_${subpackage} failed"
1552   step_by_step $_   resume_stamp src_install_${subpackage}
1553     step_by_step src_install_${subpackage}
1554   fi   fi
1555   done   done
1556   # restore bindir & pname   # restore bindir & pname
# Line 1497  else Line 1558  else
1558   # unset all saved smage variables   # unset all saved smage variables
1559   split_unset_variables   split_unset_variables
1560   else   else
1561   src_install | ${SMAGE_LOG_CMD}   ( run_resume src_install || src_install ) | ${SMAGE_LOG_CMD}
1562   die_pipestatus 0 "src_install failed"   die_pipestatus 0 "src_install failed"
1563   step_by_step $_   resume_stamp src_install
1564     step_by_step src_install
1565   fi   fi
1566  fi  fi
1567    
# Line 1509  echo Line 1571  echo
1571  if mqueryfeature "!compressdoc"  if mqueryfeature "!compressdoc"
1572  then  then
1573   echo -e "!compressdoc detected; documentation will not be compressed ..."   echo -e "!compressdoc detected; documentation will not be compressed ..."
1574    elif mqueryfeature "!pkgbuild"
1575    then
1576     echo "!pkgbuild detected; skipping documentation compression..."
1577  else  else
1578   # compressing doc, info & man files   # compressing doc, info & man files
1579   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
1580   then   then
1581   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
1582   do   do
1583   mcompressdocs ${BINDIR}_${subpackage}   run_resume mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage}
1584     resume_stamp mcompressdoc_${subpackage}
1585   done   done
1586   else   else
1587   mcompressdocs ${BINDIR}   run_resume mcompressdoc || mcompressdocs ${BINDIR}
1588     resume_stamp mcompressdoc
1589   fi   fi
1590  fi  fi
1591    
1592  if mqueryfeature "!libtool"  if mqueryfeature "!libtool"
1593  then  then
1594     if mqueryfeature "!pkgbuild"
1595     then
1596     echo "!pkgbuild detected; skipping libtool archive stripping ..."
1597     else
1598   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
1599   then   then
1600   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
1601   do   do
1602   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}"
1603   mstriplibtoolarchive ${BINDIR}_${subpackage}   run_resume mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage}
1604     resume_stamp mstriplibtoolarchive_${subpackage}
1605   done   done
1606   else   else
1607   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}"
1608   mstriplibtoolarchive ${BINDIR}   run_resume mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR}
1609     resume_stamp mstriplibtoolarchive
1610   fi   fi
1611     fi
1612  fi  fi
1613    
1614  if mqueryfeature "purge"  if mqueryfeature "purge"
1615  then  then
1616     if mqueryfeature "!pkgbuild"
1617     then
1618     echo "!pkgbuild detected; skipping file purgation..."
1619     else
1620   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
1621   then   then
1622   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
1623   do   do
1624   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}"
1625   mpurgetargets ${BINDIR}_${subpackage}   run_resume mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage}
1626     resume_stamp mpurgetargets_${subpackage}
1627   done   done
1628   else   else
1629   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}"
1630   mpurgetargets ${BINDIR}   run_resume mpurgetargets || mpurgetargets ${BINDIR}
1631     resume_stamp mpurgetargets
1632   fi   fi
1633     fi
1634  fi  fi
1635    
1636  # stripping all bins and libs  # stripping all bins and libs
1637  if mqueryfeature "!strip"  if mqueryfeature "!strip"
1638  then  then
1639   echo -e "!strip detected; Package will not be stripped ..."   echo -e "!strip detected; Package will not be stripped ..."
1640    elif mqueryfeature "!pkgbuild"
1641    then
1642     echo "!pkgbuild detected; skipping stripping of the package ..."
1643  else  else
1644   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
1645   then   then
1646   for subpackage in ${SPLIT_PACKAGES}   for subpackage in ${SPLIT_PACKAGES}
1647   do   do
1648   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"
1649   mstripbins ${BINDIR}_${subpackage}   run_resume mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage}
1650   echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}"   resume_stamp mstripbins_${subpackage}
1651   mstriplibs ${BINDIR}_${subpackage}   echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}"
1652   echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}"   run_resume mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage}
1653   mstripstatic ${BINDIR}_${subpackage}   resume_stamp mstriplibs_${subpackage}
1654   done   echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}"
1655   else   run_resume mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage}
1656   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"   resume_stamp mstripstatic_${subpackage}
1657   mstripbins ${BINDIR}   done
1658   echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries ...${COLDEFAULT}"   else
1659   mstriplibs ${BINDIR}   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"
1660   echo -e "${COLBLUE}===${COLGREEN} stripping static libraries ...${COLDEFAULT}"   run_resume mstripbins || mstripbins ${BINDIR}
1661   mstripstatic ${BINDIR}   resume_stamp mstripbins
1662   fi   echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries ...${COLDEFAULT}"
1663     run_resume mstriplibs || mstriplibs ${BINDIR}
1664     resume_stamp mstriplibs
1665     echo -e "${COLBLUE}===${COLGREEN} stripping static libraries ...${COLDEFAULT}"
1666     run_resume mstripstatic || mstripstatic ${BINDIR}
1667     resume_stamp mstripstatic
1668     fi
1669  fi  fi
1670    
1671  if mqueryfeature "!buildpkg"  if mqueryfeature "!pkgbuild"
1672  then  then
1673   echo -e "!buildpkg detected; Package will not be build ..."   echo -e "!pkgbuild detected; Package will not be build ..."
1674  else  else
1675   # build several targets   # build several targets
1676   if [[ -n ${MAGE_TARGETS} ]]   if [[ -n ${MAGE_TARGETS} ]]
# Line 1591  else Line 1681  else
1681   if typeset -f ${target}_pkgbuild > /dev/null   if typeset -f ${target}_pkgbuild > /dev/null
1682   then   then
1683   # run it   # run it
1684   ${target}_pkgbuild   run_resume ${target}_pkgbuild || ${target}_pkgbuild
1685     resume_stamp ${target}_pkgbuild
1686   fi   fi
1687   # now create the target package   # now create the target package
1688   ${MLIBDIR}/pkgbuild_dir.sh \   run_resume pkg_builddir_${target} || ${MLIBDIR}/pkgbuild_dir.sh \
1689   "${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD}" \   "${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD}" \
1690   ${BINDIR} || die "target: ${target} package-build failed"   ${BINDIR} || die "target: ${target} package-build failed"
1691     resume_stamp pkg_builddir_${target}
1692    
1693   # build pkg-md5-sum if requested   # build pkg-md5-sum if requested
1694   generate_package_md5sum \   run_resume md5sum_${target} || generate_package_md5sum \
1695   --pcat "${PCATEGORIE}" \   --pcat "${PCATEGORIE}" \
1696   --pname "${PNAME}" \   --pname "${PNAME}" \
1697   --pver "${PVER}" \   --pver "${PVER}" \
1698   --pbuild "${PBUILD}" \   --pbuild "${PBUILD}" \
1699   --parch "${ARCH}" \   --parch "${ARCH}" \
1700   --target "${target}"   --target "${target}"
1701     resume_stamp md5sum_${target}
1702    
1703   echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"   echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"
1704   done   done
# Line 1620  else Line 1713  else
1713   export PNAME="${subpackage}"   export PNAME="${subpackage}"
1714   split_info_${PNAME}   split_info_${PNAME}
1715    
1716   # jump to next one if !buildpkg is set in split_info   # jump to next one if !pkgbuild is set in split_info
1717   mqueryfeature "!buildpkg" && continue   mqueryfeature "!pkgbuild" && continue
1718    
1719   # check if an special subpackage_pkgbuild exists   # check if an special subpackage_pkgbuild exists
1720   if typeset -f ${PNAME}_pkgbuild > /dev/null   if typeset -f ${PNAME}_pkgbuild > /dev/null
1721   then   then
1722   # run it   # run it
1723   ${PNAME}_pkgbuild   run_resume ${PNAME}_pkgbuild || ${PNAME}_pkgbuild
1724     resume_stamp ${PNAME}_pkgbuild
1725   fi   fi
1726   # now create the target package   # now create the target package
1727   ${MLIBDIR}/pkgbuild_dir.sh \   run_resume pkg_builddir_${PNAME} || ${MLIBDIR}/pkgbuild_dir.sh \
1728   "${PNAME}-${PVER}-${ARCH}-${PBUILD}" \   "${PNAME}-${PVER}-${ARCH}-${PBUILD}" \
1729   "${BINDIR}_${PNAME}" || die "split_package: ${PNAME} package-build failed"   "${BINDIR}_${PNAME}" || die "split_package: ${PNAME} package-build failed"
1730     resume_stamp pkg_builddir_${PNAME}
1731    
1732   # build pkg-md5-sum if requested   # build pkg-md5-sum if requested
1733   generate_package_md5sum \   run_resume md5sum_${PNAME} || generate_package_md5sum \
1734   --pcat "${PCATEGORIE}" \   --pcat "${PCATEGORIE}" \
1735   --pname "${PNAME}" \   --pname "${PNAME}" \
1736   --pver "${PVER}" \   --pver "${PVER}" \
1737   --pbuild "${PBUILD}" \   --pbuild "${PBUILD}" \
1738   --parch "${ARCH}"   --parch "${ARCH}"
1739     resume_stamp md5sum_${PNAME}
1740    
1741   echo -e "${COLGREEN}\nPackage ${PNAME}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"   echo -e "${COLGREEN}\nPackage ${PNAME}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"
1742    
# Line 1651  else Line 1747  else
1747   split_unset_variables   split_unset_variables
1748    
1749   else   else
1750   ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed"   run_resume pkg_builddir || ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed"
1751     resume_stamp pkg_builddir
1752    
1753   # build pkg-md5-sum if requested   # build pkg-md5-sum if requested
1754   generate_package_md5sum \   run_resume md5sum || generate_package_md5sum \
1755   --pcat "${PCATEGORIE}" \   --pcat "${PCATEGORIE}" \
1756   --pname "${PNAME}" \   --pname "${PNAME}" \
1757   --pver "${PVER}" \   --pver "${PVER}" \
1758   --pbuild "${PBUILD}" \   --pbuild "${PBUILD}" \
1759   --parch "${ARCH}"   --parch "${ARCH}"
1760     resume_stamp md5sum
1761    
1762   echo -e "${COLGREEN}\nPackage ${PKGNAME} successfully builded.\n${COLDEFAULT}"   echo -e "${COLGREEN}\nPackage ${PKGNAME} successfully builded.\n${COLDEFAULT}"
1763   fi   fi
1764    
1765   # build src-pkg-tarball if requested   # build src-pkg-tarball if requested
1766   mqueryfeature "srcpkg" && source_pkg_build ${SMAGENAME}   if mqueryfeature "srcpkg"
1767     then
1768     run_resume srcpkgbuild || source_pkg_build ${SMAGENAME}
1769     resume_stamp srcpkgbuild
1770     fi
1771  fi  fi
1772    
1773  if mqueryfeature "buildlog"  if mqueryfeature "buildlog"

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