mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
build: move install dirs out of the build dir
Instead of cluttering $BUILD we now have - $BUILD/build sources and builds of packages - $BUILD/install_pkg installed packages - $BUILD/install_init installed packages for initramfs
This commit is contained in:
parent
61af0490ef
commit
8e4663912a
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user