X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fmain;h=dea3d93e5db66e8f75f4d85ee14759d12adbed15;hb=247bd6736180cd47e5a7e6745236305783bc3e1b;hp=770c3b6624d4e79aa4232056917907901708de3d;hpb=156d2726bb5be61a74ac4de5112085c7ae5d849a;p=hvlinux.git diff --git a/functions/main b/functions/main index 770c3b6..dea3d93 100644 --- a/functions/main +++ b/functions/main @@ -869,6 +869,7 @@ indicate_pkg_build_complete() # Remaining arguments: Additional configure options # Options: # -c Do not decompress package +# -d DIR Change to directory DIR before configuring and building. # -j Disable parallel make for this package # -l Unique identification label in 'install.log' # (default is package name and version) @@ -888,16 +889,22 @@ ipkg() export DECOMPRESS="1" export IPKG_MODE="ac" # Default mode if not specified export HVLABEL="" # Global variable + export SRC_DIR="" # Global variable, source directory + export BUILD_DIR="" # Global variable, build directory + export SRC_SUBDIR="" # Global variable export ENABLE_DEPENDENCY_TRACKING="0" local HVMAKE_ORIG=${HVMAKE} - while getopts "cjl:m:s:t" flag ;do + while getopts "cd:jl:m:s:t" flag ;do case ${flag} in c) # Do not decompress package DECOMPRESS="0" ;; + d) + SRC_SUBDIR=${OPTARG} + ;; j) # Disable parallel make only for this package HVMAKE="make" @@ -959,6 +966,21 @@ ipkg() PACKAGE_LOG=${LFS_LOG_DIR}/${HVLABEL}.log PACKAGE_DONE=${LFS_LOG_DIR}/${HVLABEL}.done PACKAGE_STATUS=${LFS_LOG_DIR}/${HVLABEL}.status + SRC_DIR="${LFS_TMP}/${PACKAGE}" + BUILD_DIR="${LFS_TMP}/${PACKAGE}" + + if [ -n "${SRC_SUBDIR}" ]; then + SRC_DIR+="/${SRC_SUBDIR}" + fi + + case "${IPKG_MODE}" in + ac) + BUILD_DIR="${LFS_TMP}/${PACKAGE}-build" + ;; + acnb|noac|xpm) + BUILD_DIR="${SRC_DIR}" + ;; + esac # Checking if package was previously successfully installed if [ -f ${PACKAGE_DONE} ]; then