From: Hugo Villeneuve Date: Sat, 27 Dec 2014 17:03:48 +0000 (-0500) Subject: Add ipkg option to specify installation directory X-Git-Url: http://gitweb.hugovil.com/?p=hvlinux.git;a=commitdiff_plain;h=9707abe87559d89a0610ee9c5e18bcd569e38cdc Add ipkg option to specify installation directory --- diff --git a/functions/ipkg b/functions/ipkg index 2fd39eb..428dabc 100644 --- a/functions/ipkg +++ b/functions/ipkg @@ -80,7 +80,12 @@ hvconfig() hvbuild() { ${HVMAKE} - ${HVMAKE} install + + if [ -n "${INSTALL_DIR}" ]; then + ${HVMAKE} DESTDIR=${INSTALL_DIR} install + else + ${HVMAKE} install + fi } # Default patch applying function diff --git a/functions/main b/functions/main index dea3d93..2801230 100644 --- a/functions/main +++ b/functions/main @@ -870,6 +870,7 @@ indicate_pkg_build_complete() # Options: # -c Do not decompress package # -d DIR Change to directory DIR before configuring and building. +# -i DIR Installation directory (for cross-compilation, stage1) # -j Disable parallel make for this package # -l Unique identification label in 'install.log' # (default is package name and version) @@ -892,11 +893,12 @@ ipkg() export SRC_DIR="" # Global variable, source directory export BUILD_DIR="" # Global variable, build directory export SRC_SUBDIR="" # Global variable + export INSTALL_DIR="" # Global variable, installation directory export ENABLE_DEPENDENCY_TRACKING="0" local HVMAKE_ORIG=${HVMAKE} - while getopts "cd:jl:m:s:t" flag ;do + while getopts "cd:i:jl:m:s:t" flag ;do case ${flag} in c) # Do not decompress package @@ -905,6 +907,9 @@ ipkg() d) SRC_SUBDIR=${OPTARG} ;; + i) + INSTALL_DIR=${OPTARG} + ;; j) # Disable parallel make only for this package HVMAKE="make"