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.39 2005-10-03 21:02:31 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.41 2006-03-04 23:29:45 niro Exp $ |
8 |
|
|
9 |
#01.10.2004 |
#01.10.2004 |
10 |
# added ccache support |
# added ccache support |
25 |
|
|
26 |
source /etc/mage.rc |
source /etc/mage.rc |
27 |
|
|
28 |
showversion() { |
# set PKGDIR and BUILDDIR and BINDIR to MROOT |
29 |
|
if [[ -n ${MROOT} ]] |
30 |
|
then |
31 |
|
export PKGDIR=${MROOT}/${PKGDIR} |
32 |
|
export BUILDDIR=${MROOT}/${BUILDDIR} |
33 |
|
export BINDIR=${MROOT}/${BINDIR} |
34 |
|
fi |
35 |
|
|
36 |
|
showversion() |
37 |
|
{ |
38 |
echo -en "Magellan Source Install v${SMAGEVERSION} " |
echo -en "Magellan Source Install v${SMAGEVERSION} " |
39 |
echo -e "-- Niels Rogalla (niro@magellan-linux.de)" |
echo -e "-- Niels Rogalla (niro@magellan-linux.de)" |
40 |
} |
} |
41 |
|
|
42 |
die() { |
die() |
43 |
|
{ |
44 |
xtitleclean |
xtitleclean |
45 |
echo "SMAGE failed: $@" |
echo "SMAGE failed: $@" |
46 |
exit 1 |
exit 1 |
47 |
} |
} |
48 |
|
|
49 |
xtitle() { |
xtitle() |
50 |
if [ ${TERM} == "xterm" ] |
{ |
51 |
|
if [[ ${TERM} = xterm ]] |
52 |
then |
then |
53 |
echo -ne "\033]0;[sMage: $@]\007" |
echo -ne "\033]0;[sMage: $@]\007" |
54 |
fi |
fi |
55 |
return 0 |
return 0 |
56 |
} |
} |
57 |
|
|
58 |
xtitleclean() { |
xtitleclean() |
59 |
if [ ${TERM} == "xterm" ] |
{ |
60 |
|
if [[ ${TERM} = xterm ]] |
61 |
then |
then |
62 |
echo -ne "\033]0;\007" |
echo -ne "\033]0;\007" |
63 |
fi |
fi |
64 |
return 0 |
return 0 |
65 |
} |
} |
66 |
|
|
67 |
syncsmage2() { |
syncsmage2() |
68 |
|
{ |
69 |
xtitle "Updating smage2-script tree ..." |
xtitle "Updating smage2-script tree ..." |
70 |
local i |
local i |
71 |
for i in ${SMAGE2RSYNC} |
for i in ${SMAGE2RSYNC} |
84 |
--delete \ |
--delete \ |
85 |
--delete-after \ |
--delete-after \ |
86 |
${i} ${SMAGESCRIPTSDIR} |
${i} ${SMAGESCRIPTSDIR} |
87 |
|
|
88 |
if [ "$?" == "0" ] |
if [[ $? = 0 ]] |
89 |
then |
then |
90 |
break |
break |
91 |
else |
else |
92 |
continue |
continue |
93 |
fi |
fi |
94 |
|
|
95 |
done |
done |
96 |
|
|
97 |
#clean up backup files (foo~) |
# clean up backup files (foo~) |
98 |
find ${SMAGESCRIPTSDIR} -name *~ -exec rm '{}' ';' |
find ${SMAGESCRIPTSDIR} -name *~ -exec rm '{}' ';' |
99 |
|
|
100 |
xtitleclean |
xtitleclean |
101 |
} |
} |
102 |
|
|
103 |
# $1 filename |
# $1 filename |
104 |
get_db_md5_sum() { |
get_db_md5_sum() |
105 |
|
{ |
106 |
local DB_FILE |
local DB_FILE |
107 |
local MD5_FILE |
local MD5_FILE |
108 |
local i |
local i |
115 |
echo "${i}" |
echo "${i}" |
116 |
} |
} |
117 |
|
|
118 |
download_sources() { |
download_sources() |
119 |
|
{ |
120 |
|
|
121 |
[ -z "${SRC_URI}" ] && echo -e "\nNothing declared to download.\n" && return 0 |
[ -z "${SRC_URI}" ] && echo -e "\nNothing declared to download.\n" && return 0 |
122 |
|
|
128 |
local DB_MD5_SUM_FILE="${MD5DIR}/$(basename ${SMAGENAME} .${SMAGESUFFIX}).md5" |
local DB_MD5_SUM_FILE="${MD5DIR}/$(basename ${SMAGENAME} .${SMAGESUFFIX}).md5" |
129 |
local FETCHING |
local FETCHING |
130 |
local i mirror |
local i mirror |
|
|
|
131 |
|
|
132 |
#install SRCDIR/PNAME if not exist |
|
133 |
|
# install SRCDIR/PNAME if not exist |
134 |
[ ! -d ${SOURCEDIR}/${PNAME} ] && install -d ${SOURCEDIR}/${PNAME} |
[ ! -d ${SOURCEDIR}/${PNAME} ] && install -d ${SOURCEDIR}/${PNAME} |
135 |
|
|
136 |
# check if FETCHING is needed |
# check if FETCHING is needed |
137 |
( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} &> /dev/null ) |
( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} &> /dev/null ) |
138 |
if [[ $? == 0 ]] |
if [[ $? = 0 ]] |
139 |
then |
then |
140 |
# md5's ok, not fetching needed |
# md5's ok, not fetching needed |
141 |
FETCHING=false |
FETCHING=false |
142 |
else |
else |
143 |
FETCHING=true |
FETCHING=true |
144 |
fi |
fi |
145 |
|
|
146 |
for ((i=0; i < EOA; i++)) |
for ((i=0; i < EOA; i++)) |
147 |
do |
do |
148 |
# url to file |
# url to file |
167 |
my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|mirror:/|${mirror}/sources|g")" |
my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|mirror:/|${mirror}/sources|g")" |
168 |
|
|
169 |
#echo "DEBUG: ${MY_SRC_URI}" |
#echo "DEBUG: ${MY_SRC_URI}" |
170 |
if [[ ${FETCHING} == true ]] |
if [[ ${FETCHING} = true ]] |
171 |
then |
then |
172 |
echo "==> fetching ${my_SRC_URI_MIRROR}" |
echo "==> fetching ${my_SRC_URI_MIRROR}" |
173 |
wget \ |
wget \ |
177 |
--progress bar \ |
--progress bar \ |
178 |
--directory-prefix="${my_SOURCEDIR}" \ |
--directory-prefix="${my_SOURCEDIR}" \ |
179 |
"${my_SRC_URI_MIRROR}" |
"${my_SRC_URI_MIRROR}" |
180 |
if [ "$?" == "0" ] |
if [[ $? = 0 ]] |
181 |
then |
then |
182 |
break |
break |
183 |
else |
else |
187 |
done |
done |
188 |
else |
else |
189 |
#echo "DEBUG: ${SRC_URI[${i}]}" |
#echo "DEBUG: ${SRC_URI[${i}]}" |
190 |
if [[ ${FETCHING} == true ]] |
if [[ ${FETCHING} = true ]] |
191 |
then |
then |
192 |
echo "==> fetching ${my_SRC_URI}" |
echo "==> fetching ${my_SRC_URI}" |
193 |
wget \ |
wget \ |
206 |
# fi |
# fi |
207 |
fi |
fi |
208 |
fi |
fi |
209 |
|
|
210 |
# unset them to be shure |
# unset them to be shure |
211 |
unset my_SRC_URI |
unset my_SRC_URI |
212 |
unset my_SRC_URI_DEST |
unset my_SRC_URI_DEST |
225 |
} |
} |
226 |
|
|
227 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that not exist in smage file |
228 |
src_prepare() { |
src_prepare() |
229 |
|
{ |
230 |
echo "no src_prepare defined" |
echo "no src_prepare defined" |
231 |
sleep 2 |
sleep 2 |
232 |
return 0 |
return 0 |
233 |
} |
} |
234 |
|
|
235 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that not exist in smage file |
236 |
src_compile() { |
src_compile() |
237 |
|
{ |
238 |
echo "no src_compile defined" |
echo "no src_compile defined" |
239 |
sleep 2 |
sleep 2 |
240 |
return 0 |
return 0 |
241 |
} |
} |
242 |
|
|
243 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that not exist in smage file |
244 |
src_install() { |
src_install() |
245 |
|
{ |
246 |
echo "no src_install defined" |
echo "no src_install defined" |
247 |
sleep 2 |
sleep 2 |
248 |
return 0 |
return 0 |
249 |
} |
} |
250 |
|
|
251 |
mconfigure() { |
mconfigure() |
252 |
|
{ |
253 |
if [ -x ./configure ] |
if [ -x ./configure ] |
254 |
then |
then |
255 |
./configure \ |
./configure \ |
256 |
--prefix=/usr \ |
--prefix=/usr \ |
257 |
--host=${CHOST} \ |
--host=${CHOST} \ |
258 |
--mandir=/usr/share/man \ |
--mandir=/usr/share/man \ |
259 |
--infodir=/usr/share/info \ |
--infodir=/usr/share/info \ |
260 |
--datadir=/usr/share \ |
--datadir=/usr/share \ |
261 |
--sysconfdir=/etc \ |
--sysconfdir=/etc \ |
262 |
--localstatedir=/var/lib \ |
--localstatedir=/var/lib \ |
263 |
"$@" || die "mconfigure failed" |
"$@" || die "mconfigure failed" |
264 |
else |
else |
265 |
echo "configure is not an executable ..." |
echo "configure is not an executable ..." |
266 |
exit 1 |
exit 1 |
267 |
fi |
fi |
268 |
} |
} |
269 |
|
|
270 |
minstall() { |
minstall() |
271 |
if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then |
{ |
272 |
|
if [ -f ./[mM]akefile -o -f ./GNUmakefile ] |
273 |
|
then |
274 |
make prefix=${BINDIR}/usr \ |
make prefix=${BINDIR}/usr \ |
275 |
datadir=${BINDIR}/usr/share \ |
datadir=${BINDIR}/usr/share \ |
276 |
infodir=${BINDIR}/usr/share/info \ |
infodir=${BINDIR}/usr/share/info \ |
283 |
fi |
fi |
284 |
} |
} |
285 |
|
|
286 |
mmake() { |
mmake() |
287 |
|
{ |
288 |
make ${MAKEOPTS} ${EXTRA_EMAKE} "$@" |
make ${MAKEOPTS} ${EXTRA_EMAKE} "$@" |
289 |
} |
} |
290 |
|
|
291 |
munpack() { |
munpack() |
292 |
|
{ |
293 |
local SRCFILE |
local SRCFILE |
294 |
local IFTAR |
local IFTAR |
295 |
local DEST |
local DEST |
296 |
|
|
297 |
SRCFILE=$1 |
SRCFILE=$1 |
298 |
|
|
299 |
if [ -z "$2" ] |
if [ -z "$2" ] |
300 |
then |
then |
301 |
DEST=${BUILDDIR} |
DEST=${BUILDDIR} |
302 |
else |
else |
303 |
DEST=$2 |
DEST=$2 |
304 |
fi |
fi |
305 |
|
|
306 |
case "${SRCFILE##*.}" in |
case "${SRCFILE##*.}" in |
307 |
bz2) |
bz2) |
308 |
IFTAR="$(basename $SRCFILE .bz2)" |
IFTAR="$(basename $SRCFILE .bz2)" |
309 |
IFTAR="${IFTAR##*.}" |
IFTAR="${IFTAR##*.}" |
310 |
if [ "${IFTAR}" == "tar" ] |
if [[ ${IFTAR} = tar ]] |
311 |
then |
then |
312 |
tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
313 |
fi |
fi |
315 |
gz) |
gz) |
316 |
IFTAR="$(basename $SRCFILE .gz)" |
IFTAR="$(basename $SRCFILE .gz)" |
317 |
IFTAR="${IFTAR##*.}" |
IFTAR="${IFTAR##*.}" |
318 |
if [ "${IFTAR}" == "tar" ] |
if [[ ${IFTAR} = tar ]] |
319 |
then |
then |
320 |
tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
321 |
fi |
fi |
332 |
esac |
esac |
333 |
} |
} |
334 |
|
|
335 |
mpatch() { |
mpatch() |
336 |
|
{ |
337 |
local PATCHOPTS |
local PATCHOPTS |
338 |
local PATCHFILE |
local PATCHFILE |
339 |
|
|
344 |
} |
} |
345 |
|
|
346 |
|
|
347 |
minstalldocs() { |
minstalldocs() |
348 |
|
{ |
349 |
local docfiles |
local docfiles |
|
|
|
350 |
docfiles="$@" |
docfiles="$@" |
351 |
|
|
352 |
if [ ! -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} ] |
if [ ! -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} ] |
353 |
then |
then |
354 |
install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs." |
install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs." |
355 |
fi |
fi |
356 |
|
|
357 |
for i in ${docfiles} |
for i in ${docfiles} |
358 |
do |
do |
359 |
cat ${i} | gzip -9c > ${i}.gz || die "gzipping docs." |
cat ${i} | gzip -9c > ${i}.gz || die "gzipping docs." |
362 |
done |
done |
363 |
} |
} |
364 |
|
|
365 |
mstriplibs() { |
mstriplibs() |
366 |
|
{ |
367 |
local stripdir="$@" |
local stripdir="$@" |
368 |
|
|
369 |
[ -z "${stripdir}" ] && stripdir=${BINDIR} |
[ -z "${stripdir}" ] && stripdir=${BINDIR} |
370 |
find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
371 |
} |
} |
372 |
|
|
373 |
mstripbins() { |
mstripbins() |
374 |
|
{ |
375 |
local stripdir="$@" |
local stripdir="$@" |
376 |
|
|
377 |
[ -z "${stripdir}" ] && stripdir=${BINDIR} |
[ -z "${stripdir}" ] && stripdir=${BINDIR} |
378 |
find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
379 |
} |
} |
380 |
|
|
381 |
sminclude() { |
sminclude() |
382 |
|
{ |
383 |
local i |
local i |
384 |
|
|
385 |
if [[ -n "$@" ]] |
if [[ -n "$@" ]] |
393 |
fi |
fi |
394 |
} |
} |
395 |
|
|
396 |
setup_distcc_environment(){ |
setup_distcc_environment() |
397 |
|
{ |
398 |
if [ -x /usr/bin/distcc ] |
if [ -x /usr/bin/distcc ] |
399 |
then |
then |
400 |
echo "Using DistCC for compilation ..." |
echo "Using DistCC for compilation ..." |
401 |
export PATH=/usr/lib/distcc/bin:${PATH} || die "distcc: could not export new $PATH" |
export PATH=/usr/lib/distcc/bin:${PATH} || die "distcc: could not export new $PATH" |
402 |
|
|
403 |
#export distcc as compiler |
# export distcc as compiler |
404 |
# export CC="distcc" |
# export CC="distcc" |
405 |
# export CXX=distcc |
# export CXX=distcc |
406 |
|
|
407 |
export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed" |
export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed" |
408 |
|
|
409 |
|
# ccache + distcc together |
410 |
#ccache + distcc together |
if [[ ${SMAGE_USE_CCACHE} = true ]] |
|
if [ "${SMAGE_USE_CCACHE}" == "true" ] |
|
411 |
then |
then |
412 |
if [ -x /usr/bin/ccache ] |
if [ -x /usr/bin/ccache ] |
413 |
then |
then |
418 |
fi |
fi |
419 |
fi |
fi |
420 |
|
|
421 |
#creating distcc tempdir |
# creating distcc tempdir |
422 |
install -o distcc -g daemon -d ${DISTCC_DIR} |
install -o distcc -g daemon -d ${DISTCC_DIR} |
423 |
chmod 1777 ${DISTCC_DIR} |
chmod 1777 ${DISTCC_DIR} |
424 |
fi |
fi |
425 |
} |
} |
426 |
|
|
427 |
setup_ccache_environment(){ |
setup_ccache_environment() |
428 |
|
{ |
429 |
if [ -x /usr/bin/ccache ] |
if [ -x /usr/bin/ccache ] |
430 |
then |
then |
431 |
echo "Using CCache for compilation ..." |
echo "Using CCache for compilation ..." |
437 |
|
|
438 |
# fixes given dependencies to match a MAGE_TARGET |
# fixes given dependencies to match a MAGE_TARGET |
439 |
# fix_mage_deps -target s/depend # <-- note -target ! |
# fix_mage_deps -target s/depend # <-- note -target ! |
440 |
fix_mage_deps() { |
fix_mage_deps() |
441 |
|
{ |
442 |
local target="$1" |
local target="$1" |
443 |
local depend="$2" |
local depend="$2" |
444 |
local NDEPEND |
local NDEPEND |
541 |
> ${dest} |
> ${dest} |
542 |
|
|
543 |
# header |
# header |
544 |
echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.39 2005-10-03 21:02:31 niro Exp $' >> ${dest} |
echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.41 2006-03-04 23:29:45 niro Exp $' >> ${dest} |
545 |
echo >> ${dest} |
echo >> ${dest} |
546 |
|
|
547 |
# pgkname and state |
# pgkname and state |
775 |
fi |
fi |
776 |
|
|
777 |
# updating smage2-scripts |
# updating smage2-scripts |
778 |
if [ "$1" == "update" ] |
if [[ $1 = update ]] |
779 |
then |
then |
780 |
if [ ! -d ${SOURCEDIR} ] |
if [ ! -d ${SOURCEDIR} ] |
781 |
then |
then |
786 |
fi |
fi |
787 |
|
|
788 |
# creates md5sums for smages to given dir |
# creates md5sums for smages to given dir |
789 |
if [ "$1" == "calcmd5" ] |
if [[ $1 = calcmd5 ]] |
790 |
then |
then |
791 |
if [ $# -ge 3 ] |
if [ $# -ge 3 ] |
792 |
then |
then |
838 |
unset my_SRC_URI_MIRROR |
unset my_SRC_URI_MIRROR |
839 |
unset my_SOURCEDIR |
unset my_SOURCEDIR |
840 |
done |
done |
841 |
|
|
842 |
echo |
echo |
843 |
echo "Calculating of md5 sums for '$(basename ${SMAGENAME} .${SMAGESUFFIX})' done." |
echo "Calculating of md5 sums for '$(basename ${SMAGENAME} .${SMAGESUFFIX})' done." |
844 |
echo |
echo |
851 |
echo |
echo |
852 |
exit 1 |
exit 1 |
853 |
fi |
fi |
854 |
|
|
855 |
exit 0 |
exit 0 |
856 |
fi |
fi |
857 |
|
|
894 |
exit 0 |
exit 0 |
895 |
fi |
fi |
896 |
|
|
897 |
if [ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] |
[ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] && die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting." |
898 |
then |
[ -z "$(basename ${SMAGENAME} | grep .${SMAGESUFFIX})" ] && |
899 |
die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting." |
die "File '$(basename ${SMAGENAME})' is not a sMage v${SMAGEVERSION} file. Aborting." |
900 |
fi |
[ -z "${SOURCEDIR}" ] && die "\$SOURCEDIR not found. Please setup your mage.rc correctly." |
901 |
|
[ -z "${SMAGESCRIPTSDIR}" ] && die "\$SMAGESCRIPTSDIR not found. Please setup your mage.rc correctly." |
902 |
if [ -z "`basename ${SMAGENAME}|grep .${SMAGESUFFIX}`" ] |
[ -z "${SMAGE2RSYNC}" ] && die "\$SMAGE2RSYNC not found. Please setup your mage.rc correctly." |
903 |
then |
[ -z "${BINDIR}" ] && die "no BINDIR variable found in /etc/mage.rc" |
904 |
die "File '`basename ${SMAGENAME}`' is not a sMage v${SMAGEVERSION} file. Aborting." |
[ -z "${CHOST}" ] && die "no CHOST variable found in /etc/mage.rc" |
905 |
fi |
[ -z "${CFLAGS}" ] && die "no CFLAGS variable found in /etc/mage.rc" |
906 |
|
[ -z "${CXXFLAGS}" ] && die "no CXXFLAGS variable found in /etc/mage.rc" |
|
if [ -z "${SOURCEDIR}" ] |
|
|
then |
|
|
die "\$SOURCEDIR not found. Please setup your mage.rc correctly." |
|
|
fi |
|
|
|
|
|
if [ -z "${SMAGESCRIPTSDIR}" ] |
|
|
then |
|
|
die "\$SMAGESCRIPTSDIR not found. Please setup your mage.rc correctly." |
|
|
fi |
|
|
|
|
|
if [ -z "${SMAGE2RSYNC}" ] |
|
|
then |
|
|
echo "\$SMAGE2RSYNC not found. Please setup your mage.rc correctly." |
|
|
exit 1 |
|
|
fi |
|
|
|
|
|
if [ -z "${BINDIR}" ] |
|
|
then |
|
|
die "no BINDIR variable found in /etc/mage.rc" |
|
|
fi |
|
|
|
|
|
if [ -z "${CHOST}" ] |
|
|
then |
|
|
die "no CHOST variable found in /etc/mage.rc" |
|
|
fi |
|
|
|
|
|
if [ -z "${CFLAGS}" ] |
|
|
then |
|
|
die "no CFLAGS variable found in /etc/mage.rc" |
|
|
fi |
|
|
|
|
|
if [ -z "${CXXFLAGS}" ] |
|
|
then |
|
|
die "no CXXFLAGS variable found in /etc/mage.rc" |
|
|
fi |
|
|
|
|
907 |
|
|
908 |
source ${SMAGENAME} || die "source failed" |
source ${SMAGENAME} || die "source failed" |
909 |
PKGNAME="${PNAME}-${PVER}-${ARCH}-${PBUILD}" |
PKGNAME="${PNAME}-${PVER}-${ARCH}-${PBUILD}" |
933 |
|
|
934 |
# setup distcc |
# setup distcc |
935 |
# distcc mus be setup *before* ccache, as ccache need to be before distcc in path |
# distcc mus be setup *before* ccache, as ccache need to be before distcc in path |
936 |
if [ "${SMAGE_USE_DISTCC}" == "true" ] |
[[ ${SMAGE_USE_DISTCC} = true ]] && setup_distcc_environment |
|
then |
|
|
setup_distcc_environment |
|
|
fi |
|
937 |
|
|
938 |
# setup ccache |
# setup ccache |
939 |
if [ "${SMAGE_USE_CCACHE}" == "true" ] |
[[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment |
|
then |
|
|
setup_ccache_environment |
|
|
fi |
|
|
|
|
940 |
|
|
941 |
# small sleep to show our settings |
# small sleep to show our settings |
942 |
sleep 1 |
sleep 1 |
1021 |
echo -e "NOPGKBUILD=true detected; Package will not be build ..." |
echo -e "NOPGKBUILD=true detected; Package will not be build ..." |
1022 |
;; |
;; |
1023 |
*) |
*) |
1024 |
# build serveral targets |
# build several targets |
1025 |
if [ -n "${MAGE_TARGETS}" ] |
if [ -n "${MAGE_TARGETS}" ] |
1026 |
then |
then |
1027 |
for target in ${MAGE_TARGETS} |
for target in ${MAGE_TARGETS} |