173 |
my_SOURCEDIR="${SOURCEDIR}/${PNAME}" |
my_SOURCEDIR="${SOURCEDIR}/${PNAME}" |
174 |
fi |
fi |
175 |
|
|
176 |
|
# create the SOURCEDIR |
177 |
|
install -d ${my_SOURCEDIR} |
178 |
|
|
179 |
# if an mirrored file than replace first the mirror uri |
# if an mirrored file than replace first the mirror uri |
180 |
if [[ -n $(echo ${my_SRC_URI} | grep 'mirror://') ]] |
if [[ -n $(echo ${my_SRC_URI} | grep 'mirror://') ]] |
181 |
then |
then |
191 |
--tries 3 \ |
--tries 3 \ |
192 |
--continue \ |
--continue \ |
193 |
--progress bar \ |
--progress bar \ |
194 |
--directory-prefix="${my_SOURCEDIR}" \ |
--output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \ |
195 |
"${my_SRC_URI_MIRROR}" |
"${my_SRC_URI_MIRROR}" |
196 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
197 |
then |
then |
215 |
--tries 3 \ |
--tries 3 \ |
216 |
--continue \ |
--continue \ |
217 |
--progress bar \ |
--progress bar \ |
218 |
--directory-prefix="${my_SOURCEDIR}" \ |
--output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \ |
219 |
"${my_SRC_URI_MIRROR}" |
"${my_SRC_URI_MIRROR}" |
220 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
221 |
then |
then |
239 |
--tries 3 \ |
--tries 3 \ |
240 |
--continue \ |
--continue \ |
241 |
--progress bar \ |
--progress bar \ |
242 |
--directory-prefix="${my_SOURCEDIR}" \ |
--output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \ |
243 |
"${my_SRC_URI_MIRROR}" |
"${my_SRC_URI_MIRROR}" |
244 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
245 |
then |
then |
263 |
--tries 3 \ |
--tries 3 \ |
264 |
--continue \ |
--continue \ |
265 |
--progress bar \ |
--progress bar \ |
266 |
--directory-prefix="${my_SOURCEDIR}" \ |
--output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \ |
267 |
"${my_SRC_URI_MIRROR}" |
"${my_SRC_URI_MIRROR}" |
268 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
269 |
then |
then |
287 |
--tries 3 \ |
--tries 3 \ |
288 |
--continue \ |
--continue \ |
289 |
--progress bar \ |
--progress bar \ |
290 |
--directory-prefix="${my_SOURCEDIR}" \ |
--output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI_MIRROR})" \ |
291 |
"${my_SRC_URI_MIRROR}" |
"${my_SRC_URI_MIRROR}" |
292 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
293 |
then |
then |
306 |
--tries 3 \ |
--tries 3 \ |
307 |
--continue \ |
--continue \ |
308 |
--progress bar \ |
--progress bar \ |
309 |
--directory-prefix="${my_SOURCEDIR}" \ |
--output-document="${my_SOURCEDIR}/$(basename ${my_SRC_URI})" \ |
310 |
"${my_SRC_URI}" |
"${my_SRC_URI}" |
311 |
fi |
fi |
312 |
fi |
fi |
885 |
# fix target as it may be empty ! |
# fix target as it may be empty ! |
886 |
[ -n "${target}" ] && target="-${target}" |
[ -n "${target}" ] && target="-${target}" |
887 |
|
|
888 |
|
|
889 |
# build pkgname |
# build pkgname |
890 |
pkgname="${pname}${target}-${pver}-${parch}-${pbuild}" |
pkgname="${pname}${target}-${pver}-${parch}-${pbuild}" |
891 |
|
|
1073 |
|
|
1074 |
regen_mage_tree |
regen_mage_tree |
1075 |
|
|
1076 |
# build md5sum for existing packages |
# build several targets |
1077 |
generate_package_md5sum \ |
if [ -n "${MAGE_TARGETS}" ] |
1078 |
--pcat "${PCATEGORIE}" \ |
then |
1079 |
--pname "${PNAME}" \ |
for target in ${MAGE_TARGETS} |
1080 |
--pver "${PVER}" \ |
do |
1081 |
--pbuild "${PBUILD}" \ |
# build md5sum for existing packages |
1082 |
--parch "${ARCH}" \ |
generate_package_md5sum \ |
1083 |
--target "${target}" |
--pcat "${PCATEGORIE}" \ |
1084 |
|
--pname "${PNAME}" \ |
1085 |
|
--pver "${PVER}" \ |
1086 |
|
--pbuild "${PBUILD}" \ |
1087 |
|
--parch "${ARCH}" \ |
1088 |
|
--target "${target}" |
1089 |
|
done |
1090 |
|
else |
1091 |
|
# build md5sum for existing packages |
1092 |
|
generate_package_md5sum \ |
1093 |
|
--pcat "${PCATEGORIE}" \ |
1094 |
|
--pname "${PNAME}" \ |
1095 |
|
--pver "${PVER}" \ |
1096 |
|
--pbuild "${PBUILD}" \ |
1097 |
|
--parch "${ARCH}" \ |
1098 |
|
--target "${target}" |
1099 |
|
fi |
1100 |
|
|
1101 |
exit 0 |
exit 0 |
1102 |
fi |
fi |
1239 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
1240 |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
1241 |
|
|
1242 |
( src_prepare || die "src_prepare failed" ) | ${SMAGE_LOG_CMD} |
src_prepare || die "src_prepare failed" | ${SMAGE_LOG_CMD} |
1243 |
step_by_step $_ |
step_by_step $_ |
1244 |
( src_compile || die "src_compile failed" ) | ${SMAGE_LOG_CMD} |
src_compile || die "src_compile failed" | ${SMAGE_LOG_CMD} |
1245 |
step_by_step $_ |
step_by_step $_ |
1246 |
( src_install || die "src_install failed" ) | ${SMAGE_LOG_CMD} |
src_install || die "src_install failed" | ${SMAGE_LOG_CMD} |
1247 |
step_by_step $_ |
step_by_step $_ |
1248 |
|
|
1249 |
|
|