7 |
# TODO: record dynlib, gz | xz database |
# TODO: record dynlib, gz | xz database |
8 |
|
|
9 |
|
|
10 |
# set default user mage.rc |
# set default variables |
11 |
: ${MAGERC="/etc/mage.rc"} |
: ${MAGERC="@@SYSCONFDIR@@/mage.rc"} |
12 |
|
: ${MLIBDIR="@@MAGELIBDIR@@"} |
13 |
|
|
14 |
# export default C locale |
# export default C locale |
15 |
export LC_ALL=C |
export LC_ALL=C |
16 |
|
|
17 |
source /etc/mage.rc.global |
# first of all include common functions |
18 |
source ${MAGERC} |
source ${MLIBDIR}/common.functions.sh || exit 1 |
19 |
source ${MLIBDIR}/mage4.functions.sh |
source @@SYSCONFDIR@@/mage.rc.global || die "@@SYSCONFDIR@@/mage.rc.global missing." |
20 |
source ${MLIBDIR}/smage2.functions.sh |
source ${MAGERC} || die "${MAGERC} missing." |
21 |
|
source ${MLIBDIR}/mage4.functions.sh || die "${MLIBDIR}/mage4.functions.sh missing." |
22 |
|
source ${MLIBDIR}/smage2.functions.sh || die "${MLIBDIR}/smage2.functions.sh missing." |
23 |
|
|
24 |
# export default path |
# export default path |
25 |
export PATH="${PATH}:${MLIBDIR}" |
export PATH="${PATH}:${MLIBDIR}" |
26 |
|
|
27 |
## setup ## |
## setup ## |
28 |
SMAGENAME="$1" |
SMAGENAME="$1" |
|
SMAGEVERSION="$(< ${MLIBDIR}/version)" |
|
29 |
|
|
30 |
# expand PKGDIR, BUILDDIR and BINDIR with MROOT |
# expand PKGDIR, BUILDDIR and BINDIR with MROOT |
31 |
if [[ -n ${MROOT} ]] |
if [[ -n ${MROOT} ]] |
270 |
xtitle "Compiling ${PKGNAME}" |
xtitle "Compiling ${PKGNAME}" |
271 |
echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}" |
echo -e "${COLGREEN}Compiling ${PKGNAME}${COLDEFAULT}" |
272 |
|
|
|
# auto regen mage tree if requested |
|
|
regen_mage_tree |
|
|
|
|
273 |
if mqueryfeature "srcpkgbuild" |
if mqueryfeature "srcpkgbuild" |
274 |
then |
then |
275 |
if [[ -d ${SOURCEDIR}/${PNAME} ]] |
if [[ -d ${SOURCEDIR}/${PNAME} ]] |
767 |
fi |
fi |
768 |
fi |
fi |
769 |
|
|
770 |
|
# auto regen mage tree if requested |
771 |
|
regen_mage_tree |
772 |
|
|
773 |
if mqueryfeature "buildlog" |
if mqueryfeature "buildlog" |
774 |
then |
then |
775 |
bzip2 -9f /var/log/smage/${PKGNAME}.log |
bzip2 -9f /var/log/smage/${PKGNAME}.log |