Magellan Linux

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

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

revision 833 by niro, Wed Apr 29 20:20:46 2009 UTC revision 881 by niro, Mon Jun 29 18:56:32 2009 UTC
# Line 20  SMAGENAME="$1" Line 20  SMAGENAME="$1"
20  SMAGESUFFIX="smage2"  SMAGESUFFIX="smage2"
21  MLIBDIR=/usr/lib/mage  MLIBDIR=/usr/lib/mage
22  SMAGEVERSION="$( < ${MLIBDIR}/version)"  SMAGEVERSION="$( < ${MLIBDIR}/version)"
23    SMAGE_LOG_CMD="tee -a /var/log/smage/${PKGNAME}.log"
24    
25    
26  ## only for tests -> normally in /etc/rc.d/init.d/functions  ## only for tests -> normally in /etc/rc.d/init.d/functions
27  COLRED="\033[1;6m\033[31m"  COLRED="\033[1;6m\033[31m"
# Line 187  download_sources() Line 189  download_sources()
189   --continue \   --continue \
190   --progress bar \   --progress bar \
191   --directory-prefix="${my_SOURCEDIR}" \   --directory-prefix="${my_SOURCEDIR}" \
192     --output-document="$(basename ${my_SRC_URI_MIRROR})" \
193   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
194   if [[ $? = 0 ]]   if [[ $? = 0 ]]
195   then   then
# Line 211  download_sources() Line 214  download_sources()
214   --continue \   --continue \
215   --progress bar \   --progress bar \
216   --directory-prefix="${my_SOURCEDIR}" \   --directory-prefix="${my_SOURCEDIR}" \
217     --output-document="$(basename ${my_SRC_URI_MIRROR})" \
218   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
219   if [[ $? = 0 ]]   if [[ $? = 0 ]]
220   then   then
# Line 235  download_sources() Line 239  download_sources()
239   --continue \   --continue \
240   --progress bar \   --progress bar \
241   --directory-prefix="${my_SOURCEDIR}" \   --directory-prefix="${my_SOURCEDIR}" \
242     --output-document="$(basename ${my_SRC_URI_MIRROR})" \
243   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
244   if [[ $? = 0 ]]   if [[ $? = 0 ]]
245   then   then
# Line 259  download_sources() Line 264  download_sources()
264   --continue \   --continue \
265   --progress bar \   --progress bar \
266   --directory-prefix="${my_SOURCEDIR}" \   --directory-prefix="${my_SOURCEDIR}" \
267     --output-document="$(basename ${my_SRC_URI_MIRROR})" \
268   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
269   if [[ $? = 0 ]]   if [[ $? = 0 ]]
270   then   then
# Line 283  download_sources() Line 289  download_sources()
289   --continue \   --continue \
290   --progress bar \   --progress bar \
291   --directory-prefix="${my_SOURCEDIR}" \   --directory-prefix="${my_SOURCEDIR}" \
292     --output-document="$(basename ${my_SRC_URI_MIRROR})" \
293   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
294   if [[ $? = 0 ]]   if [[ $? = 0 ]]
295   then   then
# Line 302  download_sources() Line 309  download_sources()
309   --continue \   --continue \
310   --progress bar \   --progress bar \
311   --directory-prefix="${my_SOURCEDIR}" \   --directory-prefix="${my_SOURCEDIR}" \
312     --output-document="$(basename ${my_SRC_URI_MIRROR})" \
313   "${my_SRC_URI}"   "${my_SRC_URI}"
314   fi   fi
315   fi   fi
# Line 937  source_pkg_build() Line 945  source_pkg_build()
945   echo -e "${COLGREEN}Source package ${COLBLUE}${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} ${COLGREEN}successfully builded.${COLDEFAULT}"   echo -e "${COLGREEN}Source package ${COLBLUE}${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} ${COLGREEN}successfully builded.${COLDEFAULT}"
946  }  }
947    
948    step_by_step()
949    {
950     if [[ ${STEP_BY_STEP} = true ]]
951     then
952     echo "${COLRED}Step-by-step enabled! Paused after $1.${COLDEFAULT}"
953     echo "Press [enter] to continue"
954     read
955     fi
956    }
957    
958    
959  # print out our version  # print out our version
960  showversion  showversion
# Line 1203  then Line 1221  then
1221   mage rmstamp   mage rmstamp
1222  fi  fi
1223    
1224  src_prepare || die "src_prepare failed"  # setup build loggins
1225  src_compile || die "src_compile failed"  [[ ! -d /var/log/smage ]] && install -d /var/log/smage
1226  src_install || die "src_install failed"  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log
1227    
1228    src_prepare || die "src_prepare failed" | ${SMAGE_LOG_CMD}
1229    step_by_step $_
1230    src_compile || die "src_compile failed" | ${SMAGE_LOG_CMD}
1231    step_by_step $_
1232    src_install || die "src_install failed" | ${SMAGE_LOG_CMD}
1233    step_by_step $_
1234    
1235    
1236  # compressing doc, info & man files  # compressing doc, info & man files
# Line 1286  case ${NOPKGBUILD} in Line 1311  case ${NOPKGBUILD} in
1311   ;;   ;;
1312  esac  esac
1313    
1314    if [[ ${SMAGE_BUILD_LOGGING} != false ]]
1315    then
1316     bzip2 -9f /var/log/smage/${PKGNAME}.log
1317    else
1318     [[ -f /var/log/smage/${PKGNAME}.log ]] && rm /var/log/smage/${PKGNAME}.log
1319    fi
1320    
1321  # for sure  # for sure
1322  unset NOPKGBUILD  unset NOPKGBUILD
1323  unset NOSTRIP  unset NOSTRIP

Legend:
Removed from v.833  
changed lines
  Added in v.881