diff --git a/config/functions b/config/functions index e9dcdcd0f0..82bb424673 100644 --- a/config/functions +++ b/config/functions @@ -792,7 +792,7 @@ get_pkg_variable() { get_build_dir() { local _PKG_NAME="${1%:*}" _PKG_VERSION="$(get_pkg_version "$1")" if [ -n "$_PKG_NAME" -a -n "$_PKG_VERSION" ]; then - echo $BUILD/${_PKG_NAME}-${_PKG_VERSION} + echo $BUILD/build/${_PKG_NAME}-${_PKG_VERSION} fi } @@ -1030,12 +1030,12 @@ source_package() { fi fi - PKG_BUILD="$BUILD/${PKG_NAME}-${PKG_VERSION}" + PKG_BUILD="$BUILD/build/${PKG_NAME}-${PKG_VERSION}" if [[ "${1}" =~ :target$ || "${1//:/}" = "${1}" ]]; then - PKG_INSTALL="${PKG_BUILD}/.install_pkg" + PKG_INSTALL="$BUILD/install_pkg/${PKG_NAME}-${PKG_VERSION}" elif [[ "${1}" =~ :init$ ]]; then - PKG_INSTALL="${PKG_BUILD}/.install_init" + PKG_INSTALL="$BUILD/install_init/${PKG_NAME}-${PKG_VERSION}" fi fi diff --git a/scripts/build b/scripts/build index 0ad2c76b6d..0077e7e939 100755 --- a/scripts/build +++ b/scripts/build @@ -485,6 +485,10 @@ if [ "${TARGET}" = "target" -o "${TARGET}" = "init" ]; then fi fi +if [ -n "${INSTALL}" -a -d "${INSTALL}" ]; then + echo "INFO_PKG_NAME=\"${PKG_NAME}\"" > "${INSTALL}/.libreelec-package" +fi + cd ${ROOT} PKG_DEEPHASH=$(calculate_stamp) diff --git a/scripts/clean b/scripts/clean index 36ac2394d1..f6bdd60a5a 100755 --- a/scripts/clean +++ b/scripts/clean @@ -14,8 +14,10 @@ clean_package() { return fi - # Use a wilcard here to remove all versions of the package - for i in "${BUILD}/${1}-"*; do + # Use a wildcard here to remove all versions of the package + for i in "${BUILD}/build/${1}-"* \ + "${BUILD}/install_pkg/${1}-"* \ + "${BUILD}/install_init/${1}-"*; do if [ -d "${i}" -a -f "${i}/.libreelec-unpack" ]; then . "${i}/.libreelec-unpack" if [ "${STAMP_PKG_NAME}" = "${1}" ]; then diff --git a/scripts/unpack b/scripts/unpack index c88bf0769d..03980c6699 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -27,11 +27,11 @@ fi STAMP="${PKG_BUILD}/.libreelec-unpack" -mkdir -p ${BUILD} +mkdir -p ${BUILD}/build # Perform a wildcard match on the package to ensure old versions are cleaned too PKG_DEEPHASH= -for i in ${BUILD}/${PKG_NAME}-*; do +for i in ${BUILD}/build/${PKG_NAME}-*; do if [ -d ${i} -a -f "${i}/.libreelec-unpack" ] ; then . "${i}/.libreelec-unpack" if [ "${STAMP_PKG_NAME}" = "${PKG_NAME}" ]; then