82 |
fi |
fi |
83 |
|
|
84 |
# create build info dir |
# create build info dir |
85 |
install -d ${BUILDSERVER_CACHE_DIR}/build |
install -d ${BUILDSERVER_CACHE_DIR}/build/${PNAME} |
86 |
|
|
87 |
if [ ! -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/SRC_INSTALL_DEPS ] |
if [ ! -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/SRC_INSTALL_DEPS ] |
88 |
then |
then |
89 |
die "${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/SRC_INSTALL_DEPS missing. run 'buildserver-build-depends first" |
die "${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/SRC_INSTALL_DEPS missing. run 'buildserver-build-depends first" |
90 |
fi |
fi |
91 |
|
|
92 |
SRC_INSTALL_DEPS="$(< ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/SRC_INSTALL_DEPS)" |
SRC_INSTALL_DEPS="$(< ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/SRC_INSTALL_DEPS)" |
93 |
|
|
94 |
if [[ -z ${SRC_INSTALL_DEPS} ]] |
if [[ -z ${SRC_INSTALL_DEPS} ]] |
95 |
then |
then |
116 |
exit 3 |
exit 3 |
117 |
fi |
fi |
118 |
|
|
119 |
if [ -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/BUILD_OK ] |
if [ -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/BUILD_OK ] |
120 |
then |
then |
121 |
echo -en "Package " |
echo -en "Package " |
122 |
echo -en "${COLRED}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
echo -en "${COLRED}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
124 |
exit 3 |
exit 3 |
125 |
fi |
fi |
126 |
|
|
127 |
#if [ -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED ] |
#if [ -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED ] |
128 |
#then |
#then |
129 |
# echo -en "Package " |
# echo -en "Package " |
130 |
# echo -en "${COLRED}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
# echo -en "${COLRED}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
133 |
#fi |
#fi |
134 |
|
|
135 |
# create build info dir |
# create build info dir |
136 |
install -d ${BUILDSERVER_CACHE_DIR}/build |
install -d ${BUILDSERVER_CACHE_DIR}/build/${PNAME} |
137 |
|
|
138 |
echo |
echo |
139 |
echo "---- environment -----" |
echo "---- environment -----" |
146 |
echo |
echo |
147 |
#echo "DEBUG: paused"; read |
#echo "DEBUG: paused"; read |
148 |
|
|
149 |
if [ ! -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/INSTALLED_PREREQUISITES ] |
if [ ! -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/INSTALLED_PREREQUISITES ] |
150 |
then |
then |
151 |
die "${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/INSTALLED_PREREQUISITES missing. run 'buildserver-build-prerequisites first" |
die "${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/INSTALLED_PREREQUISITES missing. run 'buildserver-build-prerequisites first" |
152 |
fi |
fi |
153 |
|
|
154 |
#### building target package from src-pkg tarball#### |
#### building target package from src-pkg tarball#### |
155 |
if smage2 --src-tarball ${TARGET_SRC_TARBALL} |
if smage2 --src-tarball ${TARGET_SRC_TARBALL} |
156 |
then |
then |
157 |
build_retval=0 |
build_retval=0 |
158 |
echo 0 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/BUILD_OK |
echo 0 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/BUILD_OK |
159 |
# remove maybe existing failed file |
# remove maybe existing failed file |
160 |
if [ -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED ] |
if [ -f ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED ] |
161 |
then |
then |
162 |
rm ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED |
rm ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED |
163 |
fi |
fi |
164 |
echo "Build successfull!" |
echo "Build successfull!" |
165 |
regen_mage_tree |
regen_mage_tree |
172 |
if install_packages ${SRC_INSTALL_DEPS} || die "installing packages" |
if install_packages ${SRC_INSTALL_DEPS} || die "installing packages" |
173 |
then |
then |
174 |
install_retval=0 |
install_retval=0 |
175 |
echo 0 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/INSTALL_OK |
echo 0 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/INSTALL_OK |
176 |
echo "Install successfull!" |
echo "Install successfull!" |
177 |
else |
else |
178 |
install_retval=1 |
install_retval=1 |
179 |
echo 1 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/INSTALL_FAILED |
echo 1 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/INSTALL_FAILED |
180 |
echo "Installation *not* successfull!" |
echo "Installation *not* successfull!" |
181 |
fi |
fi |
182 |
else |
else |
183 |
build_retval=1 |
build_retval=1 |
184 |
echo 1 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED |
echo 1 > ${BUILDSERVER_CACHE_DIR}/build/${PNAME}/${PNAME}-${PVER}-${PBUILD}/BUILD_FAILED |
185 |
echo "Build failed" |
echo "Build failed" |
186 |
echo "DEBUG: read" |
echo "DEBUG: read" |
187 |
read |
read |