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" |
329 |
return 0 |
return 0 |
330 |
} |
} |
331 |
|
|
332 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that does not exist in smage file |
333 |
src_compile() |
src_compile() |
334 |
{ |
{ |
335 |
echo "no src_compile defined" |
echo "no src_compile defined" |
337 |
return 0 |
return 0 |
338 |
} |
} |
339 |
|
|
340 |
# dummy function, used if that not exist in smage file |
# dummy function, used if that does not exist in smage file |
341 |
src_install() |
src_install() |
342 |
{ |
{ |
343 |
echo "no src_install defined" |
echo "no src_install defined" |
1467 |
# small sleep to show our settings |
# small sleep to show our settings |
1468 |
sleep 1 |
sleep 1 |
1469 |
|
|
1470 |
# cleans up build if a previously one exists |
# clean up builddir if a previously one exist |
1471 |
if [ -d ${BUILDDIR} ] |
if [ -d ${BUILDDIR} ] |
1472 |
then |
then |
1473 |
rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
1474 |
fi |
fi |
1475 |
install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
1476 |
|
|
1477 |
# cleans up srcdir if a previously unpacked one exists |
# clean up srcdir if a previously unpacked one exist |
1478 |
if [ -d ${SRCDIR} ] |
if [ -d ${SRCDIR} ] |
1479 |
then |
then |
1480 |
rm -rf ${SRCDIR} |
rm -rf ${SRCDIR} |
1481 |
fi |
fi |
1482 |
|
|
1483 |
# 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 |
1484 |
if [ -d ${BINDIR} ] |
if [ -d ${BINDIR} ] |
1485 |
then |
then |
1486 |
rm -rf ${BINDIR} |
rm -rf ${BINDIR} |
1499 |
mage rmstamp |
mage rmstamp |
1500 |
fi |
fi |
1501 |
|
|
1502 |
# setup build loggins |
# setup build logging |
1503 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
1504 |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
1505 |
|
|
1599 |
then |
then |
1600 |
for target in ${MAGE_TARGETS} |
for target in ${MAGE_TARGETS} |
1601 |
do |
do |
1602 |
# check if an special target_pkgbuild exists |
# check if a special target_pkgbuild exists |
1603 |
if typeset -f ${target}_pkgbuild > /dev/null |
if typeset -f ${target}_pkgbuild > /dev/null |
1604 |
then |
then |
1605 |
# run it |
# run it |