321 |
unset SRC_URI |
unset SRC_URI |
322 |
} |
} |
323 |
|
|
324 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that does not exist in smage file |
325 |
src_prepare() |
src_prepare() |
326 |
{ |
{ |
327 |
echo "no src_prepare defined" |
echo "no src_prepare defined" |
|
sleep 2 |
|
328 |
return 0 |
return 0 |
329 |
} |
} |
330 |
|
|
331 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that does not exist in smage file |
332 |
src_compile() |
src_compile() |
333 |
{ |
{ |
334 |
echo "no src_compile defined" |
echo "no src_compile defined" |
|
sleep 2 |
|
335 |
return 0 |
return 0 |
336 |
} |
} |
337 |
|
|
338 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that does not exist in smage file |
339 |
src_install() |
src_install() |
340 |
{ |
{ |
341 |
echo "no src_install defined" |
echo "no src_install defined" |
|
sleep 2 |
|
342 |
return 0 |
return 0 |
343 |
} |
} |
344 |
|
|
1461 |
# setup ccache |
# setup ccache |
1462 |
[[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment |
[[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment |
1463 |
|
|
1464 |
# small sleep to show our settings |
# clean up builddir if a previously one exist |
|
sleep 1 |
|
|
|
|
|
# cleans up build if a previously one exists |
|
1465 |
if [ -d ${BUILDDIR} ] |
if [ -d ${BUILDDIR} ] |
1466 |
then |
then |
1467 |
rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
1468 |
fi |
fi |
1469 |
install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
1470 |
|
|
1471 |
# cleans up srcdir if a previously unpacked one exists |
# clean up srcdir if a previously unpacked one exist |
1472 |
if [ -d ${SRCDIR} ] |
if [ -d ${SRCDIR} ] |
1473 |
then |
then |
1474 |
rm -rf ${SRCDIR} |
rm -rf ${SRCDIR} |
1475 |
fi |
fi |
1476 |
|
|
1477 |
# cleans up bindir if a previous build exists or creates a new one |
# clean up bindir if a previous build exist or create a new one |
1478 |
if [ -d ${BINDIR} ] |
if [ -d ${BINDIR} ] |
1479 |
then |
then |
1480 |
rm -rf ${BINDIR} |
rm -rf ${BINDIR} |
1493 |
mage rmstamp |
mage rmstamp |
1494 |
fi |
fi |
1495 |
|
|
1496 |
# setup build loggins |
# setup build logging |
1497 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
1498 |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
1499 |
|
|
1593 |
then |
then |
1594 |
for target in ${MAGE_TARGETS} |
for target in ${MAGE_TARGETS} |
1595 |
do |
do |
1596 |
# check if an special target_pkgbuild exists |
# check if a special target_pkgbuild exists |
1597 |
if typeset -f ${target}_pkgbuild > /dev/null |
if typeset -f ${target}_pkgbuild > /dev/null |
1598 |
then |
then |
1599 |
# run it |
# run it |