Magellan Linux

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

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

revision 945 by niro, Sat Nov 21 01:31:33 2009 UTC revision 1081 by niro, Mon Jun 28 17:47:38 2010 UTC
# Line 530  minstalldocs() Line 530  minstalldocs()
530   install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs."   install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs."
531   fi   fi
532    
533     local i
534   for i in ${docfiles}   for i in ${docfiles}
535   do   do
536   cat ${i} | gzip -9c > ${i}.gz || die "gzipping docs."   if [ -f ${i} ]
537   install -m 0644 ${SRCDIR}/${i}.gz \   then
538   ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "coping docs."   cat ${i} | gzip -9c > ${i}.gz || die "gzipping docs."
539     install -m 0644 ${SRCDIR}/${i}.gz \
540     ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "coping docs."
541     fi
542   done   done
543  }  }
544    
# Line 844  regen_mage_tree() Line 848  regen_mage_tree()
848   export PNAME="${i}"   export PNAME="${i}"
849   split_info_${i}   split_info_${i}
850   build_mage_script --split-pkg-base "${split_pkg_base}"   build_mage_script --split-pkg-base "${split_pkg_base}"
851     # restore smage environment
852     split_restore_variables
853   done   done
854   echo   echo
855   # restore smage environment   # unset all saved smage variables
856   split_restore_variables   split_unset_variables
857    
858   else   else
859   echo   echo
# Line 1000  split_restore_variables() Line 1006  split_restore_variables()
1006   eval "${saved_postremove/SAVED_/}"   eval "${saved_postremove/SAVED_/}"
1007   export -f postremove   export -f postremove
1008   fi   fi
1009    }
1010    
1011    split_unset_variables()
1012    {
1013   # unset saved vars; not needed anymore   # unset saved vars; not needed anymore
1014   unset SAVED_PNAME   unset SAVED_PNAME
1015   unset SAVED_PVER   unset SAVED_PVER
# Line 1292  then Line 1301  then
1301   elif [[ -n ${SPLIT_PACKAGES} ]]   elif [[ -n ${SPLIT_PACKAGES} ]]
1302   then   then
1303   split_save_variables   split_save_variables
1304   for subpackage in ${SPLIT_PACKAGE}   for subpackage in ${SPLIT_PACKAGES}
1305   do   do
1306   # get the right variables for the split   # get the right variables for the split
1307   export PNAME="${subpackage}"   export PNAME="${subpackage}"
# Line 1304  then Line 1313  then
1313   --pver "${PVER}" \   --pver "${PVER}" \
1314   --pbuild "${PBUILD}" \   --pbuild "${PBUILD}" \
1315   --parch "${ARCH}"   --parch "${ARCH}"
1316     # restore smage environment
1317     split_restore_variables
1318   done   done
1319   split_restore_variables   # unset all saved smage variables
1320     split_unset_variables
1321    
1322   else   else
1323   # build md5sum for existing packages   # build md5sum for existing packages
# Line 1496  then Line 1508  then
1508   done   done
1509   # restore bindir & pname   # restore bindir & pname
1510   split_restore_variables   split_restore_variables
1511     # unset all saved smage variables
1512     split_unset_variables
1513  else  else
1514   src_install | ${SMAGE_LOG_CMD}   src_install | ${SMAGE_LOG_CMD}
1515   die_pipestatus 0 "src_install failed"   die_pipestatus 0 "src_install failed"
# Line 1505  fi Line 1519  fi
1519  # compressing doc, info & man files  # compressing doc, info & man files
1520  if [[ -n ${SPLIT_PACKAGES} ]]  if [[ -n ${SPLIT_PACKAGES} ]]
1521  then  then
1522   for subpackage in ${SPLIT_PACKAGE}   for subpackage in ${SPLIT_PACKAGES}
1523   do   do
1524   mcompressdocs ${BINDIR}_${subpackage}   mcompressdocs ${BINDIR}_${subpackage}
1525   done   done
# Line 1522  case ${NOSTRIP} in Line 1536  case ${NOSTRIP} in
1536   *)   *)
1537   if [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
1538   then   then
1539   for subpackage in ${SPLIT_PACKAGE}   for subpackage in ${SPLIT_PACKAGES}
1540   do   do
1541   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}"
1542   mstripbins ${BINDIR}_${subpackage}   mstripbins ${BINDIR}_${subpackage}
1543   echo -e "${COLBLUE}===${COLGREEN} stripping libraries ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} stripping libraries for '${subpackage}' ...${COLDEFAULT}"
1544   mstriplibs ${BINDIR}_${subpackage}   mstriplibs ${BINDIR}_${subpackage}
1545   done   done
1546   else   else
# Line 1582  case ${NOPKGBUILD} in Line 1596  case ${NOPKGBUILD} in
1596   export PNAME="${subpackage}"   export PNAME="${subpackage}"
1597   split_info_${PNAME}   split_info_${PNAME}
1598    
1599     # jump to next one if NOPKGBUILD is set in split_info
1600     case ${NOPKGBUILD} in
1601     true|TRUE|yes|y) continue ;;
1602     esac
1603    
1604   # check if an special subpackage_pkgbuild exists   # check if an special subpackage_pkgbuild exists
1605   if typeset -f ${PNAME}_pkgbuild > /dev/null   if typeset -f ${PNAME}_pkgbuild > /dev/null
1606   then   then
# Line 1602  case ${NOPKGBUILD} in Line 1621  case ${NOPKGBUILD} in
1621   --parch "${ARCH}"   --parch "${ARCH}"
1622    
1623   echo -e "${COLGREEN}\nPackage ${PNAME}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"   echo -e "${COLGREEN}\nPackage ${PNAME}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"
1624    
1625     # restore smage environment
1626     split_restore_variables
1627   done   done
1628   split_restore_variables   # unset all saved smage variables
1629     split_unset_variables
1630    
1631   else   else
1632   ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed"   ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed"

Legend:
Removed from v.945  
changed lines
  Added in v.1081