X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage1%2Fcis-ac;h=cf161372d049c19881a46e47ee674c83c7204de1;hb=69ac3e7cf686f8e95e47a7ab89bc38796aace488;hp=a0adcada7660b939f3b7707e72b18a13ace67d01;hpb=97b938a7a341fe0d45ba4f93ce9e785b2bdc182a;p=hvlinux.git diff --git a/stage1/cis-ac b/stage1/cis-ac index a0adcad..cf16137 100755 --- a/stage1/cis-ac +++ b/stage1/cis-ac @@ -9,13 +9,78 @@ shift CONFIGURE_OPTS=${*} # Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +source ${SCRDIR}/../sysinfos +source ${SCRDIR}/../functions +source ${SCRDIR}/../packages-list -# Applying patches (if any) -apply_patches ${PACKAGE} +DEFAULT_CONFIGURE_PREFIX=/tools -${SCRDIR}/cis-common ${PACKAGE} ${CONFIGURE_OPTS} +# Default configure function +hvconfigure() +{ + cd ${LFS_TMP}/${PACKAGE}-build + + FINAL_CFG_OPTS="\ + --prefix=${DEFAULT_CONFIGURE_PREFIX} \ + --build=${CLFS_HOST} \ + --host=${CLFS_TARGET} \ + ${CONFIGURE_OPTS}" + + echo "Running configure with options:" + echo " <${FINAL_CFG_OPTS}>" + + CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \ + ../${PACKAGE}/configure ${FINAL_CFG_OPTS} +} + +# Default build function +hvbuild() +{ + ${HVMAKE} + ${HVMAKE} install +} + +hvpatch() +{ + # Applying patches (if any) + apply_patches ${PACKAGE} +} + +PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE}) + +if [ -f ${PACKAGE_DEF} ]; then + echo "Load custom package functions and definitions" + source ${PACKAGE_DEF} +fi + +hvpatch + +# Execute config-cache function if applicable +if function_exists config_cache ; then + echo "Running configure cache script" + config_cache + + CONFIGURE_OPTS="${CONFIGURE_OPTS} --cache-file=${LFS_TMP}/${PACKAGE}-build/config.cache" +fi + +# Execute pre-configure function if applicable +if function_exists configure_pre ; then + echo "Running configure pre-script" + configure_pre +fi + +if [ -n "${HV_NO_CONFIGURE_SCRIPT}" ]; then + echo "Not calling configure because ${PACKAGE} has no configure script" +else + hvconfigure +fi + +# Execute post-configure function if applicable +if function_exists configure_post ; then + echo "Running configure post-script" + configure_post +fi + +hvbuild exit $?