1 |
#!/bin/bash |
#!/bin/bash |
2 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage-buildroot/mage-buildroot.sh,v 1.2 2006-01-26 19:58:06 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage-buildroot/mage-buildroot.sh,v 1.3 2006-06-13 16:47:54 niro Exp $ |
3 |
# |
# |
4 |
# mage buildroot |
# mage buildroot |
5 |
# creates a buildroot to compile programms |
# creates a buildroot to compile programms |
148 |
fi |
fi |
149 |
|
|
150 |
# get all dependencies of this package |
# get all dependencies of this package |
151 |
|
echo |
152 |
|
echo -n "Calculating dependencies ... " |
153 |
ALLDEPS="$(${MLIBDIR}/depwalker.sh \ |
ALLDEPS="$(${MLIBDIR}/depwalker.sh \ |
154 |
--method srcinstall \ |
--method srcinstall \ |
155 |
--pcat ${PCAT} \ |
--pcat ${PCAT} \ |
156 |
--pname ${PNAME} \ |
--pname ${PNAME} \ |
157 |
--pver ${PVER} \ |
--pver ${PVER} \ |
158 |
--pbuild ${PBUILD})" |
--pbuild ${PBUILD})" |
159 |
|
echo "done" |
160 |
|
|
161 |
# remove TARGET_PKG from list |
# remove TARGET_PKG from list |
162 |
SRC_INSTALL_DEPS="$(get_highest_magefile ${PCAT} ${TARGET_PKG})" |
SRC_INSTALL_DEPS="$(get_highest_magefile ${PCAT} ${TARGET_PKG})" |
171 |
echo "----------------------" |
echo "----------------------" |
172 |
echo |
echo |
173 |
echo "---- dependencies ----" |
echo "---- dependencies ----" |
174 |
echo "SRC_INSTALL_DEPS: ${SRC_INSTALL_DEPS}" |
echo "SRC_INSTALL_DEPS:" |
175 |
echo "INSTALL_DEPS: ${INSTALL_DEPS}" |
for i in ${SRC_INSTALL_DEPS} |
176 |
|
do |
177 |
|
echo " * ${i}" |
178 |
|
done |
179 |
|
echo "INSTALL_DEPS:" |
180 |
|
for i in ${INSTALL_DEPS} |
181 |
|
do |
182 |
|
echo " * ${i}" |
183 |
|
done |
184 |
echo "----------------------" |
echo "----------------------" |
185 |
|
|
186 |
#read |
#read |
198 |
install_packages --src-install ${SRC_INSTALL_DEPS} || die "src-installing packages" |
install_packages --src-install ${SRC_INSTALL_DEPS} || die "src-installing packages" |
199 |
|
|
200 |
# done |
# done |
201 |
|
[[ ! -d /BUILDED ]] && install -d /BUILDED |
202 |
|
mv ${PKGDIR}/${PNAME}-${PVER}-${ARCH}-${PBUILD}.mpk /BUILDED || die "pkg move" |
203 |
echo -e "Package ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT} successfully builded." |
echo -e "Package ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT} successfully builded." |
204 |
echo "You will find this in ${FAKE_MROOT}/${PKGDIR}." |
echo "You will find this in ${FAKE_MROOT}/BUILDED." |
205 |
EOF |
EOF |
206 |
|
|
207 |
# run this stuff |
# run this stuff |