Magellan Linux

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

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

revision 427 by niro, Fri Feb 23 14:42:17 2007 UTC revision 885 by niro, Tue Jun 30 20:19:28 2009 UTC
# Line 4  Line 4 
4  # needs pkgbuild_dir (mage)  # needs pkgbuild_dir (mage)
5    
6  # SMAGE2  # SMAGE2
7  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.52 2007-02-23 14:42:17 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.62 2007-11-28 10:47:50 niro Exp $
8    
9  #01.10.2004  #01.10.2004
10  # added ccache support  # added ccache support
# 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 48  fi Line 50  fi
50  # export default C locale  # export default C locale
51  export LC_ALL=C  export LC_ALL=C
52    
53    source /etc/mage.rc.global
54  source ${MAGERC}  source ${MAGERC}
55    
56  # set PKGDIR and BUILDDIR and BINDIR to MROOT  # set PKGDIR and BUILDDIR and BINDIR to MROOT
# Line 148  download_sources() Line 151  download_sources()
151   ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} &> /dev/null )   ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} &> /dev/null )
152   if [[ $? = 0 ]]   if [[ $? = 0 ]]
153   then   then
154   # md5's ok, not fetching needed   # md5's ok, no fetching needed
155   FETCHING=false   FETCHING=false
156   else   else
157   FETCHING=true   FETCHING=true
# Line 170  download_sources() Line 173  download_sources()
173   my_SOURCEDIR="${SOURCEDIR}/${PNAME}"   my_SOURCEDIR="${SOURCEDIR}/${PNAME}"
174   fi   fi
175    
176     # create the SOURCEDIR
177     install -d ${my_SOURCEDIR}
178    
179   # if an mirrored file than replace first the mirror uri   # if an mirrored file than replace first the mirror uri
180   if [ -n "$(echo ${my_SRC_URI} | grep 'mirror://')" ]   if [[ -n $(echo ${my_SRC_URI} | grep 'mirror://') ]]
181   then   then
182   for mirror in ${MIRRORS}   for mirror in ${MIRRORS}
183   do   do
# Line 179  download_sources() Line 185  download_sources()
185    
186   if [[ ${FETCHING} = true ]]   if [[ ${FETCHING} = true ]]
187   then   then
188   echo "==> fetching ${my_SRC_URI_MIRROR}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
189     wget \
190     --passive-ftp \
191     --tries 3 \
192     --continue \
193     --progress bar \
194     --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
195     "${my_SRC_URI_MIRROR}"
196     if [[ $? = 0 ]]
197     then
198     break
199     else
200     continue
201     fi
202     fi
203     done
204     elif [[ -n $(echo ${my_SRC_URI} | grep 'sourceforge://') ]]
205     then
206     for mirror in ${SOURCEFORGE_MIRRORS}
207     do
208     my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|sourceforge:/|${mirror}|g")"
209    
210     if [[ ${FETCHING} = true ]]
211     then
212     echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
213     wget \
214     --passive-ftp \
215     --tries 3 \
216     --continue \
217     --progress bar \
218     --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
219     "${my_SRC_URI_MIRROR}"
220     if [[ $? = 0 ]]
221     then
222     break
223     else
224     continue
225     fi
226     fi
227     done
228     elif [[ -n $(echo ${my_SRC_URI} | grep 'gnu://') ]]
229     then
230     for mirror in ${GNU_MIRRORS}
231     do
232     my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|gnu:/|${mirror}|g")"
233    
234     if [[ ${FETCHING} = true ]]
235     then
236     echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
237     wget \
238     --passive-ftp \
239     --tries 3 \
240     --continue \
241     --progress bar \
242     --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
243     "${my_SRC_URI_MIRROR}"
244     if [[ $? = 0 ]]
245     then
246     break
247     else
248     continue
249     fi
250     fi
251     done
252     elif [[ -n $(echo ${my_SRC_URI} | grep 'kde://') ]]
253     then
254     for mirror in ${KDE_MIRRORS}
255     do
256     my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|kde:/|${mirror}|g")"
257    
258     if [[ ${FETCHING} = true ]]
259     then
260     echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
261     wget \
262     --passive-ftp \
263     --tries 3 \
264     --continue \
265     --progress bar \
266     --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
267     "${my_SRC_URI_MIRROR}"
268     if [[ $? = 0 ]]
269     then
270     break
271     else
272     continue
273     fi
274     fi
275     done
276     elif [[ -n $(echo ${my_SRC_URI} | grep 'gnome://') ]]
277     then
278     for mirror in ${GNOME_MIRRORS}
279     do
280     my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|gnome:/|${mirror}|g")"
281    
282     if [[ ${FETCHING} = true ]]
283     then
284     echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI_MIRROR}${COLDEFAULT}"
285   wget \   wget \
286   --passive-ftp \   --passive-ftp \
287   --tries 3 \   --tries 3 \
288   --continue \   --continue \
289   --progress bar \   --progress bar \
290   --directory-prefix="${my_SOURCEDIR}" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \
291   "${my_SRC_URI_MIRROR}"   "${my_SRC_URI_MIRROR}"
292   if [[ $? = 0 ]]   if [[ $? = 0 ]]
293   then   then
# Line 198  download_sources() Line 300  download_sources()
300   else   else
301   if [[ ${FETCHING} = true ]]   if [[ ${FETCHING} = true ]]
302   then   then
303   echo "==> fetching ${my_SRC_URI}"   echo -e "${COLBLUE}==>${COLGREEN} fetching ${my_SRC_URI}${COLDEFAULT}"
304   wget \   wget \
305   --passive-ftp \   --passive-ftp \
306   --tries 3 \   --tries 3 \
307   --continue \   --continue \
308   --progress bar \   --progress bar \
309   --directory-prefix="${my_SOURCEDIR}" \   --output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI})" \
310   "${my_SRC_URI}"   "${my_SRC_URI}"
311   fi   fi
312   fi   fi
# Line 218  download_sources() Line 320  download_sources()
320    
321   # recheck md5 sums   # recheck md5 sums
322   echo   echo
323   echo ">== Checking MD5 sums:"   echo -e "${COLBLUE}===${COLGREEN} Checking MD5 sums:${COLDEFAULT}"
324   ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} ) || die "md5 failed"   ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} ) || die "md5 failed"
325   echo   echo
326    
# Line 265  mconfigure() Line 367  mconfigure()
367   ./configure \   ./configure \
368   --prefix=/usr \   --prefix=/usr \
369   --host=${CHOST} \   --host=${CHOST} \
370     --build=${CHOST} \
371   --mandir=/usr/share/man \   --mandir=/usr/share/man \
372   --infodir=/usr/share/info \   --infodir=/usr/share/info \
373   --datadir=/usr/share \   --datadir=/usr/share \
# Line 308  munpack() Line 411  munpack()
411    
412   SRCFILE=$1   SRCFILE=$1
413    
414   if [ -z "$2" ]   if [[ -z $2 ]]
415   then   then
416   DEST=${BUILDDIR}   DEST=${BUILDDIR}
417   else   else
# Line 323  munpack() Line 426  munpack()
426   IFTAR="${IFTAR##*.}"   IFTAR="${IFTAR##*.}"
427   if [[ ${IFTAR} = tar ]]   if [[ ${IFTAR} = tar ]]
428   then   then
429   tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST}   tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tar.bz2 unpack failed."
430     else
431     pushd ${DEST} > /dev/null
432     bzcat ${SOURCEDIR}/${PNAME}/${SRCFILE} > ${DEST}/$(basename ${SRCFILE} .bz2) || die ".bz2 unpack failed."
433     popd > /dev/null
434   fi   fi
435   ;;   ;;
436   gz)   gz)
# Line 331  munpack() Line 438  munpack()
438   IFTAR="${IFTAR##*.}"   IFTAR="${IFTAR##*.}"
439   if [[ ${IFTAR} = tar ]]   if [[ ${IFTAR} = tar ]]
440   then   then
441   tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST}   tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tar.gz unpack failed."
442     else
443     pushd ${DEST} > /dev/null
444     zcat ${SOURCEDIR}/${PNAME}/${SRCFILE} > ${DEST}/$(basename ${SRCFILE} .gz) || die ".gz unpack failed."
445     popd > /dev/null
446   fi   fi
447   ;;   ;;
448   tbz2)   tbz2|mpks|mpk)
449   tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST}   tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tbz2 unpack failed."
450   ;;   ;;
451   tgz)   tgz)
452   tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST}   tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tgz unpack failed."
453     ;;
454     rar)
455     unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST}  || die ".rar unpack failed."
456     ;;
457     zip|xpi)
458     unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed."
459     ;;
460     rpm)
461     pushd ${DEST} > /dev/null
462     rpm2targz ${SOURCEDIR}/${PNAME}/${SRCFILE} || die "rpm2targz: .rpm unpack failed."
463     tar --no-same-owner -xvzf ${SRCFILE/.rpm/.tar.gz} || die "tar: .rpm unpack failed."
464     if [[ -f ${DEST}/${SRCFILE/.rpm/.tar.gz} ]]
465     then
466     rm ${DEST}/${SRCFILE/.rpm/.tar.gz}
467     fi
468   ;;   ;;
469   *)   *)
470   die "munpack failed"   die "munpack failed"
# Line 350  mpatch() Line 476  mpatch()
476  {  {
477   local PATCHOPTS   local PATCHOPTS
478   local PATCHFILE   local PATCHFILE
479     local i
480    
481   PATCHOPTS=$1   PATCHOPTS=$1
482   PATCHFILE=$2   PATCHFILE=$2
483    
484     if [[ -z $2 ]]
485     then
486     PATCHFILE=$1
487    
488     ## patch level auto-detection, get patch level
489     for ((i=0; i < 10; i++))
490     do
491     patch --dry-run -Np${i} -i ${SOURCEDIR}/${PNAME}/${PATCHFILE} > /dev/null
492     if [[ $? = 0 ]]
493     then
494     PATCHOPTS="-Np${i}"
495     break
496     fi
497     done
498     fi
499    
500   echo -e "${COLBLUE}*** ${COLGREEN}Applying patch '${PATCHFILE}'${COLDEFAULT}"   echo -e "${COLBLUE}*** ${COLGREEN}Applying patch '${PATCHFILE}'${COLDEFAULT}"
501   patch "${PATCHOPTS}" -i ${SOURCEDIR}/${PNAME}/${PATCHFILE}   patch "${PATCHOPTS}" -i ${SOURCEDIR}/${PNAME}/${PATCHFILE}
502  }  }
503    
504    mlibtoolize()
505    {
506     local opts="$@"
507     [[ -z ${opts} ]] && opts="--copy --force"
508    
509     libtoolize ${opts} || die "running: mlibtoolize ${opts}"
510    }
511    
512  minstalldocs()  minstalldocs()
513  {  {
# Line 412  setup_distcc_environment() Line 562  setup_distcc_environment()
562  {  {
563   if [ -x /usr/bin/distcc ]   if [ -x /usr/bin/distcc ]
564   then   then
565   echo "Using DistCC for compilation ..."   echo -e "${COLBLUE}---${COLGREEN} Using DistCC for compilation ...${COLDEFAULT}"
566   export PATH=/usr/$(mlibdir)/distcc/bin:${PATH} || die "distcc: could not export new $PATH"   export PATH=/usr/$(mlibdir)/distcc/bin:${PATH} || die "distcc: could not export new $PATH"
567    
568   export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed"   export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed"
# Line 427  setup_ccache_environment() Line 577  setup_ccache_environment()
577  {  {
578   if [ -x /usr/bin/ccache ]   if [ -x /usr/bin/ccache ]
579   then   then
580   echo "Using CCache for compilation ..."   echo -e "${COLBLUE}---${COLGREEN} Using CCache for compilation ...${COLDEFAULT}"
581   export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH"   export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH"
582   fi   fi
583  }  }
# Line 506  EOF Line 656  EOF
656  # special tags:  # special tags:
657  #   PKGTYPE               type of pkg  #   PKGTYPE               type of pkg
658  #   INHERITS              which functions get included  #   INHERITS              which functions get included
659  #   SPECIAL_FUNCTIONS     special functions wich should also be added  #   SPECIAL_FUNCTIONS     special functions which should also be added
660  #                         warning: they get killed before the build starts !  #                         warning: they get killed before the build starts !
661  #  #
662  #   MAGE_TREE_DEST        target destination of the generated tree  #   MAGE_TREE_DEST        target destination of the generated tree
# Line 534  build_mage_script() Line 684  build_mage_script()
684   dest="${MAGE_TREE_DEST}/${PCATEGORIE}/${PNAME}${target}/${magefile}"   dest="${MAGE_TREE_DEST}/${PCATEGORIE}/${PNAME}${target}/${magefile}"
685    
686   # show what we are doing   # show what we are doing
687   echo "Generating Mage file:"   echo -e "${COLBLUE}===${COLGREEN} generating mage file:${COLDEFAULT}"
688   echo "  ${dest}"   echo "${dest}"
689    
690   install -d "$(dirname ${dest})"   install -d "$(dirname ${dest})"
691   # now build the mage file   # now build the mage file
692   > ${dest}   > ${dest}
693    
694   # header   # header
695   echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.52 2007-02-23 14:42:17 niro Exp $' >> ${dest}   echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.62 2007-11-28 10:47:50 niro Exp $' >> ${dest}
696   echo  >> ${dest}   echo  >> ${dest}
697    
698   # pgkname and state   # pgkname and state
# Line 650  regen_mage_tree() Line 800  regen_mage_tree()
800   # now unset all uneeded vars to be safe   # now unset all uneeded vars to be safe
801   # unset PKGNAME <-- don't do that; smage needs this var   # unset PKGNAME <-- don't do that; smage needs this var
802   # unset to be safe (quotes needed !)   # unset to be safe (quotes needed !)
803   for i in ${SPECIAL_FUNCTIONS}  # for i in ${SPECIAL_FUNCTIONS}
804   do  # do
805   unset "${i}"  # unset "${i}"
806   done  # done
807   unset SPECIAL_FUNCTIONS   unset SPECIAL_FUNCTIONS
808   for i in ${SPECIAL_VARS}  # for i in ${SPECIAL_VARS}
809   do  # do
810   unset "${i}"  # unset "${i}"
811   done  # done
812   unset SPECIAL_VARS   unset SPECIAL_VARS
813   unset STATE   unset STATE
814   unset DESCRIPTION   unset DESCRIPTION
# Line 741  generate_package_md5sum() Line 891  generate_package_md5sum()
891   # build pkg-md5-sum only if requested   # build pkg-md5-sum only if requested
892   if [[ ${REGEN_MAGE_TREE} = true ]]   if [[ ${REGEN_MAGE_TREE} = true ]]
893   then   then
894   echo -n "Generating a md5sum for ${pkgname}.${PKGSUFFIX} ... "   echo -ne "${COLBLUE}===${COLGREEN} generating md5's for ${pkgname}.${PKGSUFFIX} ... ${COLDEFAULT}"
895    
896   # abort if not exist   # abort if not exist
897   if [ ! -f ${PKGDIR}/${pkgname}.${PKGSUFFIX} ]   if [ ! -f ${PKGDIR}/${pkgname}.${PKGSUFFIX} ]
898   then   then
899   echo "! exists"   echo -e "${COLRED}! exists${COLDEFAULT}"
900   return 0   return 0
901   fi   fi
902    
# Line 760  generate_package_md5sum() Line 910  generate_package_md5sum()
910   # gen md5sum   # gen md5sum
911   ( cd ${PKGDIR}; md5sum "${pkgname}.${PKGSUFFIX}" ) \   ( cd ${PKGDIR}; md5sum "${pkgname}.${PKGSUFFIX}" ) \
912   > ${dest}/${pkgname}.md5   > ${dest}/${pkgname}.md5
913   echo "done"   echo -e "${COLGREEN}done${COLDEFAULT}"
914   fi   fi
915  }  }
916    
# Line 792  source_pkg_build() Line 942  source_pkg_build()
942   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}"
943  }  }
944    
945    step_by_step()
946    {
947     if [[ ${STEP_BY_STEP} = true ]]
948     then
949     echo "${COLRED}Step-by-step enabled! Paused after $1.${COLDEFAULT}"
950     echo "Press [enter] to continue"
951     read
952     fi
953    }
954    
955    
956  # print out our version  # print out our version
957  showversion  showversion
# Line 986  PKGNAME="${PNAME}-${PVER}-${ARCH}-${PBUI Line 1146  PKGNAME="${PNAME}-${PVER}-${ARCH}-${PBUI
1146  MD5DIR="$(dirname ${SMAGENAME})/md5"  MD5DIR="$(dirname ${SMAGENAME})/md5"
1147    
1148  xtitle "Compiling ${PKGNAME}"  xtitle "Compiling ${PKGNAME}"
1149  echo "Compiling ${PKGNAME}"  echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}"
1150    
1151  # auto regen mage tree if requested  # auto regen mage tree if requested
1152  regen_mage_tree  regen_mage_tree
# Line 995  if [[ ${CREATE_SRC_PKG_TARBALL} = true ] Line 1155  if [[ ${CREATE_SRC_PKG_TARBALL} = true ]
1155  then  then
1156   if [[ -d ${SOURCEDIR}/${PNAME} ]]   if [[ -d ${SOURCEDIR}/${PNAME} ]]
1157   then   then
1158   echo -e "${COLGREEN}Deleting old sourcefiles ${COLBLUE}${SOURCEDIR}/${PNAME}${COLGREEN} ...${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} deleting old sourcefiles ${COLBLUE}${SOURCEDIR}/${PNAME}${COLGREEN} ...${COLDEFAULT}"
1159   rm -rf ${SOURCEDIR}/${PNAME}   rm -rf ${SOURCEDIR}/${PNAME}
1160   fi   fi
1161  fi  fi
# Line 1058  then Line 1218  then
1218   mage rmstamp   mage rmstamp
1219  fi  fi
1220    
1221  src_prepare || die "src_prepare failed"  # setup build loggins
1222  src_compile || die "src_compile failed"  [[ ! -d /var/log/smage ]] && install -d /var/log/smage
1223  src_install || die "src_install failed"  echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log
1224    
1225    src_prepare || die "src_prepare failed" | ${SMAGE_LOG_CMD}
1226    step_by_step $_
1227    src_compile || die "src_compile failed" | ${SMAGE_LOG_CMD}
1228    step_by_step $_
1229    src_install || die "src_install failed" | ${SMAGE_LOG_CMD}
1230    step_by_step $_
1231    
1232    
1233  # compressing doc, info & man files  # compressing doc, info & man files
 echo -e "Compressing man-pages ..."  
1234  if [ -d ${BUILDDIR}/builded/usr/share/man ]  if [ -d ${BUILDDIR}/builded/usr/share/man ]
1235  then  then
1236     echo -e "${COLBLUE}===${COLGREEN} compressing man-pages ...${COLDEFAULT}"
1237   ${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/man   ${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/man
1238  fi  fi
1239    
 echo -e "Compressing info-pages ..."  
1240  if [ -d ${BUILDDIR}/builded/usr/share/info ]  if [ -d ${BUILDDIR}/builded/usr/share/info ]
1241  then  then
1242     echo -e "${COLBLUE}===${COLGREEN} compressing info-pages ...${COLDEFAULT}"
1243   ${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/info   ${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/info
1244  fi  fi
1245    
# Line 1082  case ${NOSTRIP} in Line 1249  case ${NOSTRIP} in
1249   echo -e "NOSTRIP=true detected; Package will not be stripped ..."   echo -e "NOSTRIP=true detected; Package will not be stripped ..."
1250   ;;   ;;
1251   *)   *)
1252   echo -e "Stripping binaries ..."   echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}"
1253   mstripbins ${BINDIR}   mstripbins ${BINDIR}
1254   echo -e "Stripping libraries ..."   echo -e "${COLBLUE}===${COLGREEN} stripping libraries ...${COLDEFAULT}"
1255   mstriplibs ${BINDIR}   mstriplibs ${BINDIR}
1256   ;;   ;;
1257  esac  esac
# Line 1120  case ${NOPKGBUILD} in Line 1287  case ${NOPKGBUILD} in
1287   --parch "${ARCH}" \   --parch "${ARCH}" \
1288   --target "${target}"   --target "${target}"
1289    
1290   echo -e "\nPackage ${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n"   echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}"
1291   done   done
1292   else   else
1293   ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed"   ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed"
# Line 1133  case ${NOPKGBUILD} in Line 1300  case ${NOPKGBUILD} in
1300   --pbuild "${PBUILD}" \   --pbuild "${PBUILD}" \
1301   --parch "${ARCH}"   --parch "${ARCH}"
1302    
1303   echo -e "\nPackage ${PKGNAME} successfully builded.\n"   echo -e "${COLGREEN}\nPackage ${PKGNAME} successfully builded.\n${COLDEFAULT}"
1304   fi   fi
1305    
1306   # build src-pkg-tarball if requested   # build src-pkg-tarball if requested
# Line 1141  case ${NOPKGBUILD} in Line 1308  case ${NOPKGBUILD} in
1308   ;;   ;;
1309  esac  esac
1310    
1311    if [[ ${SMAGE_BUILD_LOGGING} != false ]]
1312    then
1313     bzip2 -9f /var/log/smage/${PKGNAME}.log
1314    else
1315     [[ -f /var/log/smage/${PKGNAME}.log ]] && rm /var/log/smage/${PKGNAME}.log
1316    fi
1317    
1318  # for sure  # for sure
1319  unset NOPKGBUILD  unset NOPKGBUILD
1320  unset NOSTRIP  unset NOSTRIP

Legend:
Removed from v.427  
changed lines
  Added in v.885