Magellan Linux

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

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

revision 2041 by niro, Fri Feb 1 09:46:47 2013 UTC revision 3181 by niro, Mon Jul 31 09:23:35 2023 UTC
# Line 225  download_sources() Line 225  download_sources()
225  }  }
226    
227  # dummy function, used if that does not exist in smage file  # dummy function, used if that does not exist in smage file
228    pkg_setup()
229    {
230     echo "no pkg_setup defined; doing nothing ..."
231     return 0
232    }
233    
234    # dummy function, used if that does not exist in smage file
235  src_prepare()  src_prepare()
236  {  {
237   echo "no src_prepare defined; doing nothing ..."   echo "no src_prepare defined; doing nothing ..."
# Line 254  src_install() Line 261  src_install()
261    
262  mlibdir()  mlibdir()
263  {  {
264   local libdir=lib   local libdir="${ABI_DEFAULT_LIBDIR}"
265   [[ ${ARCH} = x86_64 ]] && libdir=lib64   [[ ${ARCH} = i686 ]] && libdir="${ABI_X86_LIBDIR}"
266     [[ ${ARCH} = x86_64 ]] && libdir="${ABI_X86_64_LIBDIR}"
267     [[ -n ${ABI_LIBDIR} ]] && libdir="${ABI_LIBDIR}"
268    
269   echo "${libdir}"   echo "${libdir}"
270  }  }
271    
272  mconfigure()  mconfigure()
273  {  {
274     local configure_exec="./configure"
275    
276     if [[ ! -z ${MCONFIGURE_EXEC} ]]
277     then
278     if [ -x ${MCONFIGURE_EXEC} ]
279     then
280     echo -e "${COLBLUE}*** ${COLGREEN}Using '${MCONFIGURE_EXEC}' as configure script${COLDEFAULT}"
281     configure_exec="${MCONFIGURE_EXEC}"
282     else
283     die "MCONFIGURE_EXEC '${MCONFIGURE_EXEC}' not executable"
284     fi
285     fi
286    
287     if [ ! -x ${configure_exec} ]
288     then
289     die "${configure_exec} not executable"
290     fi
291    
292   local myopts   local myopts
293   if [[ ! -z ${CTARGET} ]]   if [[ ! -z ${CTARGET} ]]
294   then   then
295   myopts+=" --target=${CTARGET}"   myopts+=" --target=${CTARGET}"
296   fi   fi
297    
298   if [ -x ./configure ]   # if requested disable-static
299     if [[ ! -z $(${configure_exec} --help | grep -- '--.*able-static') ]]
300   then   then
301   # if requested disable-static   if mqueryfeature '!static'
  if [[ ! -z $(./configure --help | grep -- '--.*able-static') ]]  
  then  
  if mqueryfeature '!static'  
  then  
  myopts+=" --disable-static"  
  else  
  myopts+=" --enable-static"  
  fi  
  fi  
   
  # always enable shared by default but not for waf configure  
  if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] &&  
  [[ -z $(./configure --version | grep waf) ]]  
302   then   then
303   myopts+=" --enable-shared"   myopts+=" --disable-static"
304     else
305     myopts+=" --enable-static"
306   fi   fi
   
  ./configure \  
  --prefix=/usr \  
  --host=${CHOST} \  
  --build=${CHOST} \  
  --mandir=/usr/share/man \  
  --infodir=/usr/share/info \  
  --datadir=/usr/share \  
  --sysconfdir=/etc \  
  --localstatedir=/var/lib \  
  --libdir=/usr/$(mlibdir) \  
  ${myopts} \  
  "$@" || die "mconfigure failed"  
  else  
  echo "configure is not an executable ..."  
  exit 1  
307   fi   fi
308    
309     # always enable shared by default but not for waf configure
310     if [[ ! -z $(${configure_exec} --help | grep -- '--.*able-shared') ]] &&
311     [[ -z $(${configure_exec} --version | grep waf) ]]
312     then
313     myopts+=" --enable-shared"
314     fi
315    
316     ${configure_exec} \
317     --prefix=/usr \
318     --host=${CHOST} \
319     --build=${CHOST} \
320     --mandir=/usr/share/man \
321     --infodir=/usr/share/info \
322     --datadir=/usr/share \
323     --sysconfdir=/etc \
324     --localstatedir=/var/lib \
325     --libdir=/usr/$(mlibdir) \
326     ${myopts} \
327     "$@" || die "mconfigure failed"
328  }  }
329    
330  minstall()  minstall()
# Line 318  minstall() Line 339  minstall()
339   sysconfdir=${BINDIR}/etc \   sysconfdir=${BINDIR}/etc \
340   libdir=${BINDIR}/usr/$(mlibdir) \   libdir=${BINDIR}/usr/$(mlibdir) \
341   "$@" install || die "minstall failed"   "$@" install || die "minstall failed"
342          else   else
343                  die "no Makefile found"   die "no Makefile found"
344          fi   fi
345  }  }
346    
347  mmake()  mmake()
# Line 384  munpack() Line 405  munpack()
405   popd > /dev/null   popd > /dev/null
406   fi   fi
407   ;;   ;;
408     lz)
409     IFTAR="$(basename $SRCFILE .lz)"
410     IFTAR="${IFTAR##*.}"
411     if [[ ${IFTAR} = tar ]]
412     then
413     tar --no-same-owner -xvf --lzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tar.lz unpack failed."
414     else
415     pushd ${DEST} > /dev/null
416     lzip -dc ${SOURCEDIR}/${PNAME}/${SRCFILE} > ${DEST}/$(basename ${SRCFILE} .xz) || die ".lz unpack failed."
417     popd > /dev/null
418     fi
419     ;;
420   tbz2|mpks|mpk)   tbz2|mpks|mpk)
421   tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tbz2 unpack failed."   tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tbz2 unpack failed."
422   ;;   ;;
# Line 491  mstriplibs() Line 524  mstriplibs()
524    
525   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"
526   [[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug"   [[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug"
527   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "[shared object|pie executable]" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null
528  }  }
529    
530  mstripbins()  mstripbins()
# Line 500  mstripbins() Line 533  mstripbins()
533    
534   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"   [[ -z ${stripdir} ]] && stripdir="${BINDIR}"
535   [[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug"   [[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug"
536   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null   find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep -v "pie executable" | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null
537  }  }
538    
539  mstripstatic()  mstripstatic()
# Line 566  sminclude() Line 599  sminclude()
599   then   then
600   for i in $@   for i in $@
601   do   do
602   echo "--- Including ${SMAGESCRIPTSDIR}/include/${i}.sminc"   [[ ${SILENT} = 1 ]] || echo "--- Including ${SMAGESCRIPTSDIR}/include/${i}.sminc"
603   source ${SMAGESCRIPTSDIR}/include/${i}.sminc   source ${SMAGESCRIPTSDIR}/include/${i}.sminc
604   done   done
605   echo   [[ ${SILENT} = 1 ]] || echo
606   fi   fi
607  }  }
608    
# Line 588  march() Line 621  march()
621   return "${retval}"   return "${retval}"
622  }  }
623    
624  marchsrcfile()  marchvariable()
625  {  {
626   local retval   local retval
627   local var="$1"   local var="$1"
628    
629   [[ -z ${var} ]] && var="SRCFILE"   [[ -n ${var} ]] || die "marchvariable(): missing variable"
630    
631   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]
632   then   then
# Line 606  marchsrcfile() Line 639  marchsrcfile()
639   return "${retval}"   return "${retval}"
640  }  }
641    
642    marchsrcfile()
643    {
644     local retval
645     local var="$1"
646    
647     [[ -z ${var} ]] && var="SRCFILE"
648    
649     marchvariable "${var}" || die
650    }
651    
652  marchsrcdir()  marchsrcdir()
653  {  {
654   local retval   local retval
655   if [[ ! -z $(eval echo \$SRCDIR_${ARCH/i*86/x86}) ]]   local var="$1"
  then  
  eval echo \$SRCDIR_${ARCH/i*86/x86} | tr ';' '\n'  
  retval=0  
  else  
  retval=1  
  fi  
656    
657   return "${retval}"   [[ -z ${var} ]] && var="SRCDIR"
658    
659     marchvariable "${var}" || die
660  }  }
661    
662  marchdepend()  marchdepend()
663  {  {
664   local retval   local retval
665     local var="$1"
666    
667     [[ -z ${var} ]] && var="DEPEND"
668    
669   if [[ ! -z $(eval echo \$DEPEND_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \"\$${var}_${ARCH/i*86/x86}\") ]]
670   then   then
671   echo "\$(eval echo \\\$DEPEND_\${ARCH/i*86/x86} | tr ';' '\n')"   # evaluate with escape strings for the magefile if called by smage
672     # but do not escape if the smagefile was called by depwalker directly
673     if [[ ${SMAGE_DEPEND} = 1 ]]
674     then
675     eval echo \"\$${var}_${ARCH/i*86/x86}\" | tr ';' '\n'
676     else
677     echo "\$(eval echo \\\"\\\$${var}_\${ARCH/i*86/x86}\\\" | tr ';' '\n')"
678     fi
679   retval=0   retval=0
680   else   else
681   retval=1   retval=1
# Line 638  marchdepend() Line 687  marchdepend()
687  marchsdepend()  marchsdepend()
688  {  {
689   local retval   local retval
690   if [[ ! -z $(eval echo \$SDEPEND_${ARCH/i*86/x86}) ]]   local var="$1"
691    
692     [[ -z ${var} ]] && var="SDEPEND"
693    
694     if [[ ! -z $(eval echo \"\$${var}_${ARCH/i*86/x86}\") ]]
695   then   then
696   echo "\$(eval echo \\\$SDEPEND_\${ARCH/i*86/x86} | tr ';' '\n')"   # evaluate with escape strings for the magefile if called by smage
697     # but do not escape if the smagefile was called by depwalker directly
698     if [[ ${SMAGE_DEPEND} = 1 ]]
699     then
700     eval echo \"\$${var}_${ARCH/i*86/x86}\" | tr ';' '\n'
701     else
702     echo "\$(eval echo \\\"\\\$${var}_\${ARCH/i*86/x86}\\\" | tr ';' '\n')"
703     fi
704   retval=0   retval=0
705   else   else
706   retval=1   retval=1
# Line 664  setup_distcc_environment() Line 724  setup_distcc_environment()
724   fi   fi
725  }  }
726    
727  setup_ccache_environment()  setup_icecc_environment()
728  {  {
729   if [ -x /usr/bin/ccache ]   if [ -x /usr/bin/icecc ]
730   then   then
731   echo -e "${COLBLUE}---${COLGREEN} Using CCache for compilation ...${COLDEFAULT}"   echo -e "${COLBLUE}---${COLGREEN} Using IceCC for compilation ...${COLDEFAULT}"
732   export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH"   export PATH=/usr/$(mlibdir)/icecc/bin:${PATH} || die "icecc: could not export new $PATH"
733   fi   fi
734  }  }
735    
736  # fixes given dependencies to match a MAGE_TARGET  setup_ccache_environment()
737  # fix_mage_deps -target s/depend # <-- note -target !  {
738  fix_mage_deps()   if [ -x /usr/bin/ccache ]
 {  
  local target="$1"  
  local depend="$2"  
  local NDEPEND  
  local sym dep cat pver pname  
   
  # deps and provides are special  
  # they must be fixed to match the target  
   
  # run this only if target and depend is not empty  
  if [ -n "${target}" ] && [ -n "${depend}" ]  
739   then   then
740   # fix DEPEND   mqueryfeature "icecc" && export CCACHE_PREFIX=icecc
  while read sym dep  
  do  
  # ignore empty lines  
  [[ -z ${dep} ]] && continue  
   
  cat="$(dirname ${dep})"  
  # change if not virtual  
  if [[ ${cat} = virtual ]]  
  then  
  pname="$(basename ${dep})"  
  else  
  # fix pver to target-pver  
  # to get pname-target-pver  
   
  # doing it backwards !  
  pver="${dep##*-}"  
  # full pver  
  pname="$(basename ${dep/-${pver}/})${target}-${pver}"  
  fi  
   
  # do not add empty lines  
  if [ -z "${NDEPEND}" ]  
  then  
  NDEPEND="${sym} ${cat}/${pname}"  
  else  
  NDEPEND="${NDEPEND}  
  ${sym} ${cat}/${pname}"  
  fi  
741    
742   unset cat pname pver   echo -e "${COLBLUE}---${COLGREEN} Using CCache for compilation ...${COLDEFAULT}"
743   done << EOF   export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH"
 ${depend}  
 EOF  
  # set NDEPEND to DEPEND  
  depend="${NDEPEND}"  
744   fi   fi
   
  echo "${depend}"  
745  }  }
746    
747  # build_mage_script(): helper functions for regen_mage_tree()  # build_mage_script(): helper functions for regen_mage_tree()
# Line 762  build_mage_script() Line 777  build_mage_script()
777  {  {
778   local magefile   local magefile
779   local dest   local dest
  local target  
780   local split_pkg_base   local split_pkg_base
781   local sym   local sym
782   local depname   local depname
# Line 770  build_mage_script() Line 784  build_mage_script()
784   # if MAGE_TREE_DEST not set use BUILDDIR   # if MAGE_TREE_DEST not set use BUILDDIR
785   : ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree}   : ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree}
786    
  # determinate which suffix this mage file should get, if any  
  [[ $1 = --target ]] && shift && target="-$1"  
   
787   # mark package as splitpackage   # mark package as splitpackage
788   [[ $1 = --split-pkg-base ]] && shift && split_pkg_base="$1"   [[ $1 = --split-pkg-base ]] && shift && split_pkg_base="$1"
789    
790   # name of magefile   # name of magefile
791   magefile="${PNAME}${target}-${PVER}-${PBUILD}.mage"   magefile="${PNAME}-${PVER}-${PBUILD}.mage"
792    
793   # destination to magefile   # destination to magefile
794   dest="${MAGE_TREE_DEST}/${PCAT}/${PNAME}${target}/${magefile}"   dest="${MAGE_TREE_DEST}/${PCAT}/${PNAME}/${magefile}"
795    
796   # show what we are doing   # show what we are doing
797   echo -e "${COLBLUE}===${COLGREEN} generating mage file:${COLDEFAULT}"   echo -e "${COLBLUE}===${COLGREEN} generating mage file:${COLDEFAULT}"
# Line 791  build_mage_script() Line 802  build_mage_script()
802   > ${dest}   > ${dest}
803    
804   # pgkname and state   # pgkname and state
805   echo "PKGNAME=\"${PNAME}${target}-${PVER}-\${ARCH}$(print_distrotag)-${PBUILD}\"" >> ${dest}   echo "PKGNAME=\"${PNAME}-${PVER}-\${ARCH}$(print_distrotag)-${PBUILD}\"" >> ${dest}
806   echo "STATE=\"${STATE}\"" >> ${dest}   echo "STATE=\"${STATE}\"" >> ${dest}
807    
808   # description and homepage   # description and homepage
# Line 804  build_mage_script() Line 815  build_mage_script()
815   # special tags and vars   # special tags and vars
816   echo "PKGTYPE=\"${PKGTYPE}\""  >> ${dest}   echo "PKGTYPE=\"${PKGTYPE}\""  >> ${dest}
817    
  # echo MAGE_TARGETS ## note -target is needed !  
  echo "MAGE_TARGETS=\"${target}\"" >> ${dest}  
   
818   # split package base   # split package base
819   echo "SPLIT_PACKAGE_BASE=\"${split_pkg_base}\"" >> ${dest}   echo "SPLIT_PACKAGE_BASE=\"${split_pkg_base}\"" >> ${dest}
820    
# Line 817  build_mage_script() Line 825  build_mage_script()
825   for i in ${SPECIAL_VARS}   for i in ${SPECIAL_VARS}
826   do   do
827   # being tricky here :)   # being tricky here :)
828   echo "${i}=\"$(eval echo \$${i})\"" >> ${dest}   echo "${i}=\"$(eval echo \"\$${i}\")\"" >> ${dest}
829   done   done
830   fi   fi
831    
# Line 835  build_mage_script() Line 843  build_mage_script()
843   fi   fi
844    
845   # deps and provides   # deps and provides
846   echo "DEPEND=\"$(fix_mage_deps "${target}" "${DEPEND}")\"" >> ${dest}   echo "DEPEND=\"${DEPEND}\"" >> ${dest}
847   echo "SDEPEND=\"$(fix_mage_deps "${target}" "${SDEPEND}")\"" >> ${dest}   echo "SDEPEND=\"${SDEPEND}\"" >> ${dest}
848   echo "PROVIDE=\"${PROVIDE}\"" >> ${dest}   echo "PROVIDE=\"${PROVIDE}\"" >> ${dest}
849    
850   # add special functions   # add special functions
# Line 847  build_mage_script() Line 855  build_mage_script()
855   do   do
856   # add to mage (quotes needed !)   # add to mage (quotes needed !)
857   typeset -f "${i}" >> ${dest}   typeset -f "${i}" >> ${dest}
  # unset to be safe (quotes needed !)  
  #unset "${i}" <-- later to get every target built  
858   done   done
859   fi   fi
860    
# Line 866  regen_mage_tree() Line 872  regen_mage_tree()
872   # build them only if requested   # build them only if requested
873   if mqueryfeature regentree   if mqueryfeature regentree
874   then   then
  # run it without targets  
  if [[ -n ${MAGE_TARGETS} ]]  
  then  
  # build for each target a mage file  
  # run it with several targets  
  echo  
  for subpackage in ${MAGE_TARGETS}  
  do  
  build_mage_script --target "${subpackage}"  
  done  
  echo  
   
875   # run it for splitpackages   # run it for splitpackages
876   elif [[ -n ${SPLIT_PACKAGES} ]]   if [[ -n ${SPLIT_PACKAGES} ]]
877   then   then
878   local split_pkg_base="${PNAME}"   local split_pkg_base="${PNAME}"
879   # save smage environment   # save smage environment
# Line 919  regen_mage_tree() Line 913  regen_mage_tree()
913    
914   # now unset all uneeded vars to be safe   # now unset all uneeded vars to be safe
915   # unset PKGNAME <-- don't do that; smage needs this var   # unset PKGNAME <-- don't do that; smage needs this var
  # unset to be safe (quotes needed !)  
 # for i in ${SPECIAL_FUNCTIONS}  
 # do  
 # unset "${i}"  
 # done  
916   unset SPECIAL_FUNCTIONS   unset SPECIAL_FUNCTIONS
 # for i in ${SPECIAL_VARS}  
 # do  
 # unset "${i}"  
 # done  
917   unset SPECIAL_VARS   unset SPECIAL_VARS
918   unset STATE   unset STATE
919   unset DESCRIPTION   unset DESCRIPTION
# Line 953  split_save_variables() Line 938  split_save_variables()
938   export SAVED_DESCRIPTION="${DESCRIPTION}"   export SAVED_DESCRIPTION="${DESCRIPTION}"
939   export SAVED_HOMEPAGE="${HOMEPAGE}"   export SAVED_HOMEPAGE="${HOMEPAGE}"
940   export SAVED_SPECIAL_VARS="${SPECIAL_VARS}"   export SAVED_SPECIAL_VARS="${SPECIAL_VARS}"
941     export SAVED_SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS}"
942   export SAVED_STATE="${STATE}"   export SAVED_STATE="${STATE}"
943   export SAVED_INHERITS="${INHERITS}"   export SAVED_INHERITS="${INHERITS}"
944   export SAVED_DEPEND="${DEPEND}"   export SAVED_DEPEND="${DEPEND}"
# Line 1027  split_restore_variables() Line 1013  split_restore_variables()
1013   export DESCRIPTION="${SAVED_DESCRIPTION}"   export DESCRIPTION="${SAVED_DESCRIPTION}"
1014   export HOMEPAGE="${SAVED_HOMEPAGE}"   export HOMEPAGE="${SAVED_HOMEPAGE}"
1015   export SPECIAL_VARS="${SAVED_SPECIAL_VARS}"   export SPECIAL_VARS="${SAVED_SPECIAL_VARS}"
1016     export SPECIAL_FUNCTIONS="${SAVED_SPECIAL_FUNCTIONS}"
1017   export STATE="${SAVED_STATE}"   export STATE="${SAVED_STATE}"
1018   export INHERITS="${SAVED_INHERITS}"   export INHERITS="${SAVED_INHERITS}"
1019   export DEPEND="${SAVED_DEPEND}"   export DEPEND="${SAVED_DEPEND}"
# Line 1095  split_unset_variables() Line 1082  split_unset_variables()
1082   unset SAVED_DESCRIPTION   unset SAVED_DESCRIPTION
1083   unset SAVED_HOMEPAGE   unset SAVED_HOMEPAGE
1084   unset SAVED_SPECIAL_VARS   unset SAVED_SPECIAL_VARS
1085     unset SAVED_SPECIAL_FUNCTIONS
1086   unset SAVED_STATE   unset SAVED_STATE
1087   unset SAVED_PKGTYPE   unset SAVED_PKGTYPE
1088   unset SAVED_INHERITS   unset SAVED_INHERITS
# Line 1175  generate_package_md5sum() Line 1163  generate_package_md5sum()
1163   local pver   local pver
1164   local pbuild   local pbuild
1165   local parch   local parch
  local target  
1166   local pkgname   local pkgname
1167    
1168   # very basic getops   # very basic getops
# Line 1187  generate_package_md5sum() Line 1174  generate_package_md5sum()
1174   --pver|-v) shift; pver="$1" ;;   --pver|-v) shift; pver="$1" ;;
1175   --pbuild|-b) shift; pbuild="$1" ;;   --pbuild|-b) shift; pbuild="$1" ;;
1176   --parch|a) shift; parch="$1" ;;   --parch|a) shift; parch="$1" ;;
  --target|t) shift; target="$1" ;;  
1177   esac   esac
1178   shift   shift
1179   done   done
# Line 1203  generate_package_md5sum() Line 1189  generate_package_md5sum()
1189   [ -z "${PKGDIR}" ] && die "generate_package_md5sum() \$PKGDIR not set."   [ -z "${PKGDIR}" ] && die "generate_package_md5sum() \$PKGDIR not set."
1190   [ -z "${PKGSUFFIX}" ] && die "generate_package_md5sum() \$PKGSUFFIX not set."   [ -z "${PKGSUFFIX}" ] && die "generate_package_md5sum() \$PKGSUFFIX not set."
1191    
  # fix target as it may be empty !  
  [ -n "${target}" ] && target="-${target}"  
   
1192   # build pkgname   # build pkgname
1193   pkgname="${pname}${target}-${pver}-${parch}$(print_distrotag)-${pbuild}"   pkgname="${pname}-${pver}-${parch}$(print_distrotag)-${pbuild}"
1194    
1195   # build pkg-md5-sum only if requested   # build pkg-md5-sum only if requested
1196   if mqueryfeature regentree   if mqueryfeature regentree
# Line 1225  generate_package_md5sum() Line 1208  generate_package_md5sum()
1208   : ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree}   : ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree}
1209    
1210   # setup md5 dir   # setup md5 dir
1211   dest="${MAGE_TREE_DEST}/${pcat}/${pname}${target}/md5"   dest="${MAGE_TREE_DEST}/${pcat}/${pname}/md5"
1212   install -d ${dest}   install -d ${dest}
1213    
1214   # gen md5sum   # gen md5sum
# Line 1237  generate_package_md5sum() Line 1220  generate_package_md5sum()
1220    
1221  source_pkg_build()  source_pkg_build()
1222  {  {
  if [[ ${PKGTYPE} = virtual ]]  
  then  
  echo "Virtual package detected; src-pkg-tarball not necessary ..."  
  return 0  
  fi  
   
1223   if [[ ! -d ${SOURCEDIR}/${PNAME} ]]   if [[ ! -d ${SOURCEDIR}/${PNAME} ]]
1224   then   then
1225   echo "No SRC_URI defined; src-pkg-tarball not necessary ..."   install -d ${SOURCEDIR}/${PNAME}
  return 0  
1226   fi   fi
1227    
1228   [ -z "${SRCPKGDIR}" ] && die "\$SRCPKGDIR not found. Please setup your ${MAGERC} correctly."   [ -z "${SRCPKGDIR}" ] && die "\$SRCPKGDIR not found. Please setup your ${MAGERC} correctly."
# Line 1292  run_resume() Line 1268  run_resume()
1268   return 1   return 1
1269   fi   fi
1270  }  }
1271    
1272    mqalint()
1273    {
1274     return 0
1275    }

Legend:
Removed from v.2041  
changed lines
  Added in v.3181