7 |
smagesource() |
smagesource() |
8 |
{ |
{ |
9 |
local file="$1" |
local file="$1" |
10 |
local mystate |
local localstate |
11 |
|
local distfilestate |
12 |
local mytag |
local mytag |
13 |
|
|
14 |
source ${file} |
source ${file} |
20 |
if [[ -n ${PCATEGORIE} ]] |
if [[ -n ${PCATEGORIE} ]] |
21 |
then |
then |
22 |
PCAT="${PCATEGORIE}" |
PCAT="${PCATEGORIE}" |
23 |
|
unset PCATEGORIE |
24 |
# print a warning |
# print a warning |
25 |
echo -e "${COLYELLOW}Warning: 'PCATEGORIE' is deprecated and gets removed in the future.${COLDEFAULT}" |
echo -e "${COLYELLOW}Warning: 'PCATEGORIE' is deprecated and gets removed in the future.${COLDEFAULT}" |
26 |
echo -e "${COLYELLOW} Please modify this smage2 script to use the 'PCAT' variable.${COLDEFAULT}" |
echo -e "${COLYELLOW} Please modify this smage2 script to use the 'PCAT' variable.${COLDEFAULT}" |
30 |
fi |
fi |
31 |
fi |
fi |
32 |
|
|
33 |
[[ -n ${STATE} ]] && mystate="${STATE}" |
[[ -n ${STATE} ]] && localstate="${STATE}" |
34 |
[[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}" |
[[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}" |
35 |
|
|
|
# do not overide if local state was broken or disabled! |
|
|
case ${STATE} in |
|
|
broken) return ;; |
|
|
disabled) return ;; |
|
|
esac |
|
|
|
|
36 |
if [ -f ${SMAGESCRIPTSDIR}/distribution ] |
if [ -f ${SMAGESCRIPTSDIR}/distribution ] |
37 |
then |
then |
38 |
source ${SMAGESCRIPTSDIR}/distribution |
source ${SMAGESCRIPTSDIR}/distribution |
39 |
[[ -n ${STATE} ]] && mystate="${STATE}" |
[[ -n ${STATE} ]] && distfilestate="${STATE}" |
40 |
[[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}" |
[[ -n ${DISTROTAG} ]] && mytag="${DISTROTAG}" |
41 |
fi |
fi |
42 |
# now switch state and export it |
# now switch state and export it but do not overide any local states |
43 |
STATE="${mystate}" |
if [[ ! -z ${localstate} ]] |
44 |
|
then |
45 |
|
STATE="${localstate}" |
46 |
|
else |
47 |
|
STATE="${distfilestate}" |
48 |
|
fi |
49 |
|
|
50 |
if mqueryfeature "pkgdistrotag" |
if mqueryfeature "pkgdistrotag" |
51 |
then |
then |
59 |
echo -e "${COLRED}Requested 'pkgdistrotag' but no \$DISTROTAG found!${COLDEFAULT}" |
echo -e "${COLRED}Requested 'pkgdistrotag' but no \$DISTROTAG found!${COLDEFAULT}" |
60 |
echo -e "${COLRED}Disabled the feature for pkgbuild sanity!${COLDEFAULT}" |
echo -e "${COLRED}Disabled the feature for pkgbuild sanity!${COLDEFAULT}" |
61 |
else |
else |
62 |
# now switch state and export it |
# now switch state and export it but do not overide any local states |
63 |
export DISTROTAG="${mytag}" |
export DISTROTAG="${mytag}" |
64 |
fi |
fi |
65 |
else |
else |
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 ..." |
288 |
fi |
fi |
289 |
fi |
fi |
290 |
|
|
291 |
# always enable shared by default |
# always enable shared by default but not for waf configure |
292 |
if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] |
if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] && |
293 |
|
[[ -z $(./configure --version | grep waf) ]] |
294 |
then |
then |
295 |
myopts+=" --enable-shared" |
myopts+=" --enable-shared" |
296 |
fi |
fi |
325 |
sysconfdir=${BINDIR}/etc \ |
sysconfdir=${BINDIR}/etc \ |
326 |
libdir=${BINDIR}/usr/$(mlibdir) \ |
libdir=${BINDIR}/usr/$(mlibdir) \ |
327 |
"$@" install || die "minstall failed" |
"$@" install || die "minstall failed" |
328 |
else |
else |
329 |
die "no Makefile found" |
die "no Makefile found" |
330 |
fi |
fi |
331 |
} |
} |
332 |
|
|
333 |
mmake() |
mmake() |
350 |
DEST=$2 |
DEST=$2 |
351 |
fi |
fi |
352 |
|
|
353 |
|
echo -e "${COLBLUE}>>>${COLGREEN} Unpacking ${SOURCEDIR}/${PNAME}/${SRCFILE}${COLDEFAULT}" |
354 |
|
|
355 |
[[ ! -d ${DEST} ]] && install -d ${DEST} |
[[ ! -d ${DEST} ]] && install -d ${DEST} |
356 |
|
|
357 |
case "${SRCFILE##*.}" in |
case "${SRCFILE##*.}" in |
401 |
tar --no-same-owner -xvJf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".txz unpack failed." |
tar --no-same-owner -xvJf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".txz unpack failed." |
402 |
;; |
;; |
403 |
rar) |
rar) |
404 |
unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST} || die ".rar unpack failed." |
unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST} || die ".rar unpack failed." |
405 |
;; |
;; |
406 |
zip|xpi|jar) |
zip|xpi|jar) |
407 |
unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed." |
unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed." |
573 |
then |
then |
574 |
for i in $@ |
for i in $@ |
575 |
do |
do |
576 |
echo "--- Including ${SMAGESCRIPTSDIR}/include/${i}.sminc" |
[[ ${SILENT} = 1 ]] || echo "--- Including ${SMAGESCRIPTSDIR}/include/${i}.sminc" |
577 |
source ${SMAGESCRIPTSDIR}/include/${i}.sminc |
source ${SMAGESCRIPTSDIR}/include/${i}.sminc |
578 |
done |
done |
579 |
echo |
[[ ${SILENT} = 1 ]] || echo |
580 |
|
fi |
581 |
|
} |
582 |
|
|
583 |
|
march() |
584 |
|
{ |
585 |
|
local retval |
586 |
|
|
587 |
|
if [[ ! -z ${ARCH} ]] |
588 |
|
then |
589 |
|
echo "${ARCH}" |
590 |
|
retval=0 |
591 |
|
else |
592 |
|
retval=1 |
593 |
|
fi |
594 |
|
|
595 |
|
return "${retval}" |
596 |
|
} |
597 |
|
|
598 |
|
marchsrcfile() |
599 |
|
{ |
600 |
|
local retval |
601 |
|
local var="$1" |
602 |
|
|
603 |
|
[[ -z ${var} ]] && var="SRCFILE" |
604 |
|
|
605 |
|
if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]] |
606 |
|
then |
607 |
|
eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n' |
608 |
|
retval=0 |
609 |
|
else |
610 |
|
retval=1 |
611 |
|
fi |
612 |
|
|
613 |
|
return "${retval}" |
614 |
|
} |
615 |
|
|
616 |
|
marchsrcdir() |
617 |
|
{ |
618 |
|
local retval |
619 |
|
local var="$1" |
620 |
|
|
621 |
|
[[ -z ${var} ]] && var="SRCDIR" |
622 |
|
|
623 |
|
if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]] |
624 |
|
then |
625 |
|
eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n' |
626 |
|
retval=0 |
627 |
|
else |
628 |
|
retval=1 |
629 |
|
fi |
630 |
|
|
631 |
|
return "${retval}" |
632 |
|
} |
633 |
|
|
634 |
|
marchdepend() |
635 |
|
{ |
636 |
|
local retval |
637 |
|
local var="$1" |
638 |
|
|
639 |
|
[[ -z ${var} ]] && var="DEPEND" |
640 |
|
|
641 |
|
if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]] |
642 |
|
then |
643 |
|
echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')" |
644 |
|
retval=0 |
645 |
|
else |
646 |
|
retval=1 |
647 |
|
fi |
648 |
|
|
649 |
|
return "${retval}" |
650 |
|
} |
651 |
|
|
652 |
|
marchsdepend() |
653 |
|
{ |
654 |
|
local retval |
655 |
|
local var="$1" |
656 |
|
|
657 |
|
[[ -z ${var} ]] && var="SDEPEND" |
658 |
|
|
659 |
|
if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]] |
660 |
|
then |
661 |
|
echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')" |
662 |
|
retval=0 |
663 |
|
else |
664 |
|
retval=1 |
665 |
fi |
fi |
666 |
|
|
667 |
|
return "${retval}" |
668 |
} |
} |
669 |
|
|
670 |
setup_distcc_environment() |
setup_distcc_environment() |
682 |
fi |
fi |
683 |
} |
} |
684 |
|
|
685 |
setup_ccache_environment() |
setup_icecc_environment() |
686 |
{ |
{ |
687 |
if [ -x /usr/bin/ccache ] |
if [ -x /usr/bin/icecc ] |
688 |
then |
then |
689 |
echo -e "${COLBLUE}---${COLGREEN} Using CCache for compilation ...${COLDEFAULT}" |
echo -e "${COLBLUE}---${COLGREEN} Using IceCC for compilation ...${COLDEFAULT}" |
690 |
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" |
691 |
fi |
fi |
692 |
} |
} |
693 |
|
|
694 |
# fixes given dependencies to match a MAGE_TARGET |
setup_ccache_environment() |
695 |
# fix_mage_deps -target s/depend # <-- note -target ! |
{ |
696 |
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}" ] |
|
697 |
then |
then |
698 |
# fix DEPEND |
mqueryfeature "icecc" && export CCACHE_PREFIX=icecc |
|
while read sym dep |
|
|
do |
|
|
# ignore empty lines |
|
|
[[ -z ${dep} ]] && continue |
|
699 |
|
|
700 |
cat="$(dirname ${dep})" |
echo -e "${COLBLUE}---${COLGREEN} Using CCache for compilation ...${COLDEFAULT}" |
701 |
# change if not virtual |
export PATH=/usr/$(mlibdir)/ccache/bin:${PATH} || die "ccache: could not export new $PATH" |
|
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 |
|
|
|
|
|
unset cat pname pver |
|
|
done << EOF |
|
|
${depend} |
|
|
EOF |
|
|
# set NDEPEND to DEPEND |
|
|
depend="${NDEPEND}" |
|
702 |
fi |
fi |
|
|
|
|
echo "${depend}" |
|
703 |
} |
} |
704 |
|
|
705 |
# build_mage_script(): helper functions for regen_mage_tree() |
# build_mage_script(): helper functions for regen_mage_tree() |
735 |
{ |
{ |
736 |
local magefile |
local magefile |
737 |
local dest |
local dest |
|
local target |
|
738 |
local split_pkg_base |
local split_pkg_base |
739 |
local sym |
local sym |
740 |
local depname |
local depname |
742 |
# if MAGE_TREE_DEST not set use BUILDDIR |
# if MAGE_TREE_DEST not set use BUILDDIR |
743 |
: ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree} |
: ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree} |
744 |
|
|
|
# determinate which suffix this mage file should get, if any |
|
|
[[ $1 = --target ]] && shift && target="-$1" |
|
|
|
|
745 |
# mark package as splitpackage |
# mark package as splitpackage |
746 |
[[ $1 = --split-pkg-base ]] && shift && split_pkg_base="$1" |
[[ $1 = --split-pkg-base ]] && shift && split_pkg_base="$1" |
747 |
|
|
748 |
# name of magefile |
# name of magefile |
749 |
magefile="${PNAME}${target}-${PVER}-${PBUILD}.mage" |
magefile="${PNAME}-${PVER}-${PBUILD}.mage" |
750 |
|
|
751 |
# destination to magefile |
# destination to magefile |
752 |
dest="${MAGE_TREE_DEST}/${PCAT}/${PNAME}${target}/${magefile}" |
dest="${MAGE_TREE_DEST}/${PCAT}/${PNAME}/${magefile}" |
753 |
|
|
754 |
# show what we are doing |
# show what we are doing |
755 |
echo -e "${COLBLUE}===${COLGREEN} generating mage file:${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} generating mage file:${COLDEFAULT}" |
760 |
> ${dest} |
> ${dest} |
761 |
|
|
762 |
# pgkname and state |
# pgkname and state |
763 |
echo "PKGNAME=\"${PNAME}${target}-${PVER}-\${ARCH}$(print_distrotag)-${PBUILD}\"" >> ${dest} |
echo "PKGNAME=\"${PNAME}-${PVER}-\${ARCH}$(print_distrotag)-${PBUILD}\"" >> ${dest} |
764 |
echo "STATE=\"${STATE}\"" >> ${dest} |
echo "STATE=\"${STATE}\"" >> ${dest} |
765 |
|
|
766 |
# description and homepage |
# description and homepage |
773 |
# special tags and vars |
# special tags and vars |
774 |
echo "PKGTYPE=\"${PKGTYPE}\"" >> ${dest} |
echo "PKGTYPE=\"${PKGTYPE}\"" >> ${dest} |
775 |
|
|
|
# echo MAGE_TARGETS ## note -target is needed ! |
|
|
echo "MAGE_TARGETS=\"${target}\"" >> ${dest} |
|
|
|
|
776 |
# split package base |
# split package base |
777 |
echo "SPLIT_PACKAGE_BASE=\"${split_pkg_base}\"" >> ${dest} |
echo "SPLIT_PACKAGE_BASE=\"${split_pkg_base}\"" >> ${dest} |
778 |
|
|
801 |
fi |
fi |
802 |
|
|
803 |
# deps and provides |
# deps and provides |
804 |
echo "DEPEND=\"$(fix_mage_deps "${target}" "${DEPEND}")\"" >> ${dest} |
echo "DEPEND=\"${DEPEND}\"" >> ${dest} |
805 |
echo "SDEPEND=\"$(fix_mage_deps "${target}" "${SDEPEND}")\"" >> ${dest} |
echo "SDEPEND=\"${SDEPEND}\"" >> ${dest} |
806 |
echo "PROVIDE=\"${PROVIDE}\"" >> ${dest} |
echo "PROVIDE=\"${PROVIDE}\"" >> ${dest} |
807 |
|
|
808 |
# add special functions |
# add special functions |
813 |
do |
do |
814 |
# add to mage (quotes needed !) |
# add to mage (quotes needed !) |
815 |
typeset -f "${i}" >> ${dest} |
typeset -f "${i}" >> ${dest} |
|
# unset to be safe (quotes needed !) |
|
|
#unset "${i}" <-- later to get every target built |
|
816 |
done |
done |
817 |
fi |
fi |
818 |
|
|
830 |
# build them only if requested |
# build them only if requested |
831 |
if mqueryfeature regentree |
if mqueryfeature regentree |
832 |
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 |
|
|
|
|
833 |
# run it for splitpackages |
# run it for splitpackages |
834 |
elif [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
835 |
then |
then |
836 |
local split_pkg_base="${PNAME}" |
local split_pkg_base="${PNAME}" |
837 |
# save smage environment |
# save smage environment |
844 |
# get the right variables for the split |
# get the right variables for the split |
845 |
export PNAME="${subpackage}" |
export PNAME="${subpackage}" |
846 |
split_info_${subpackage} |
split_info_${subpackage} |
847 |
|
# fix PCATEGORIE -> PCAT |
848 |
|
if [[ ! -z ${PCATEGORIE} ]] |
849 |
|
then |
850 |
|
PCAT="${PCATEGORIE}" |
851 |
|
unset PCATEGORIE |
852 |
|
fi |
853 |
# get the preinstall etc |
# get the preinstall etc |
854 |
split_export_inherits ${subpackage} |
split_export_inherits ${subpackage} |
855 |
build_mage_script --split-pkg-base "${split_pkg_base}" |
build_mage_script --split-pkg-base "${split_pkg_base}" |
871 |
|
|
872 |
# now unset all uneeded vars to be safe |
# now unset all uneeded vars to be safe |
873 |
# 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 |
|
874 |
unset SPECIAL_FUNCTIONS |
unset SPECIAL_FUNCTIONS |
|
# for i in ${SPECIAL_VARS} |
|
|
# do |
|
|
# unset "${i}" |
|
|
# done |
|
875 |
unset SPECIAL_VARS |
unset SPECIAL_VARS |
876 |
unset STATE |
unset STATE |
877 |
unset DESCRIPTION |
unset DESCRIPTION |
896 |
export SAVED_DESCRIPTION="${DESCRIPTION}" |
export SAVED_DESCRIPTION="${DESCRIPTION}" |
897 |
export SAVED_HOMEPAGE="${HOMEPAGE}" |
export SAVED_HOMEPAGE="${HOMEPAGE}" |
898 |
export SAVED_SPECIAL_VARS="${SPECIAL_VARS}" |
export SAVED_SPECIAL_VARS="${SPECIAL_VARS}" |
899 |
|
export SAVED_SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS}" |
900 |
export SAVED_STATE="${STATE}" |
export SAVED_STATE="${STATE}" |
|
export SAVED_PKGTYPE="${PKGTYPE}" |
|
901 |
export SAVED_INHERITS="${INHERITS}" |
export SAVED_INHERITS="${INHERITS}" |
902 |
export SAVED_DEPEND="${DEPEND}" |
export SAVED_DEPEND="${DEPEND}" |
903 |
export SAVED_SDEPEND="${SDEPEND}" |
export SAVED_SDEPEND="${SDEPEND}" |
971 |
export DESCRIPTION="${SAVED_DESCRIPTION}" |
export DESCRIPTION="${SAVED_DESCRIPTION}" |
972 |
export HOMEPAGE="${SAVED_HOMEPAGE}" |
export HOMEPAGE="${SAVED_HOMEPAGE}" |
973 |
export SPECIAL_VARS="${SAVED_SPECIAL_VARS}" |
export SPECIAL_VARS="${SAVED_SPECIAL_VARS}" |
974 |
|
export SPECIAL_FUNCTIONS="${SAVED_SPECIAL_FUNCTIONS}" |
975 |
export STATE="${SAVED_STATE}" |
export STATE="${SAVED_STATE}" |
|
export PKGTYPE="${SAVED_PKGTYPE}" |
|
976 |
export INHERITS="${SAVED_INHERITS}" |
export INHERITS="${SAVED_INHERITS}" |
977 |
export DEPEND="${SAVED_DEPEND}" |
export DEPEND="${SAVED_DEPEND}" |
978 |
export SDEPEND="${SAVED_SDEPEND}" |
export SDEPEND="${SAVED_SDEPEND}" |
1040 |
unset SAVED_DESCRIPTION |
unset SAVED_DESCRIPTION |
1041 |
unset SAVED_HOMEPAGE |
unset SAVED_HOMEPAGE |
1042 |
unset SAVED_SPECIAL_VARS |
unset SAVED_SPECIAL_VARS |
1043 |
|
unset SAVED_SPECIAL_FUNCTIONS |
1044 |
unset SAVED_STATE |
unset SAVED_STATE |
1045 |
unset SAVED_PKGTYPE |
unset SAVED_PKGTYPE |
1046 |
unset SAVED_INHERITS |
unset SAVED_INHERITS |
1121 |
local pver |
local pver |
1122 |
local pbuild |
local pbuild |
1123 |
local parch |
local parch |
|
local target |
|
1124 |
local pkgname |
local pkgname |
1125 |
|
|
1126 |
# very basic getops |
# very basic getops |
1132 |
--pver|-v) shift; pver="$1" ;; |
--pver|-v) shift; pver="$1" ;; |
1133 |
--pbuild|-b) shift; pbuild="$1" ;; |
--pbuild|-b) shift; pbuild="$1" ;; |
1134 |
--parch|a) shift; parch="$1" ;; |
--parch|a) shift; parch="$1" ;; |
|
--target|t) shift; target="$1" ;; |
|
1135 |
esac |
esac |
1136 |
shift |
shift |
1137 |
done |
done |
1147 |
[ -z "${PKGDIR}" ] && die "generate_package_md5sum() \$PKGDIR not set." |
[ -z "${PKGDIR}" ] && die "generate_package_md5sum() \$PKGDIR not set." |
1148 |
[ -z "${PKGSUFFIX}" ] && die "generate_package_md5sum() \$PKGSUFFIX not set." |
[ -z "${PKGSUFFIX}" ] && die "generate_package_md5sum() \$PKGSUFFIX not set." |
1149 |
|
|
|
# fix target as it may be empty ! |
|
|
[ -n "${target}" ] && target="-${target}" |
|
|
|
|
1150 |
# build pkgname |
# build pkgname |
1151 |
pkgname="${pname}${target}-${pver}-${parch}$(print_distrotag)-${pbuild}" |
pkgname="${pname}-${pver}-${parch}$(print_distrotag)-${pbuild}" |
1152 |
|
|
1153 |
# build pkg-md5-sum only if requested |
# build pkg-md5-sum only if requested |
1154 |
if mqueryfeature regentree |
if mqueryfeature regentree |
1166 |
: ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree} |
: ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree} |
1167 |
|
|
1168 |
# setup md5 dir |
# setup md5 dir |
1169 |
dest="${MAGE_TREE_DEST}/${pcat}/${pname}${target}/md5" |
dest="${MAGE_TREE_DEST}/${pcat}/${pname}/md5" |
1170 |
install -d ${dest} |
install -d ${dest} |
1171 |
|
|
1172 |
# gen md5sum |
# gen md5sum |
1201 |
[[ ! -d ${SRCPKGDIR} ]] && install -d ${SRCPKGDIR} |
[[ ! -d ${SRCPKGDIR} ]] && install -d ${SRCPKGDIR} |
1202 |
mv ${BUILDDIR}/${PNAME}-${PVER}-${PBUILD}.tar.bz2 ${SRCPKGDIR}/${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} |
mv ${BUILDDIR}/${PNAME}-${PVER}-${PBUILD}.tar.bz2 ${SRCPKGDIR}/${PNAME}-${PVER}-${PBUILD}.${SRCPKGSUFFIX} |
1203 |
|
|
1204 |
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}\n" |
1205 |
} |
} |
1206 |
|
|
1207 |
step_by_step() |
step_by_step() |
1233 |
return 1 |
return 1 |
1234 |
fi |
fi |
1235 |
} |
} |
1236 |
|
|
1237 |
|
mqalint() |
1238 |
|
{ |
1239 |
|
return 0 |
1240 |
|
} |