summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2021-05-23 16:09:48 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-05-23 16:09:48 +0900
commit8bb36a4b48211ab3115590bd2860f230e8257fd1 (patch)
tree7f821f9b68d3e4b65b26174376dbd97bb66bc363
parent0c4db8b6da24d664ad2d2267e837265db7aa0df5 (diff)
downloadtde-packaging-8bb36a4b48211ab3115590bd2860f230e8257fd1.tar.gz
tde-packaging-8bb36a4b48211ab3115590bd2860f230e8257fd1.zip
DEB build scripts: added ability to build local modules even when they
are not yet part of the TDE umbrella. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rwxr-xr-xdebian/_buildscripts/local/build_module.sh42
1 files changed, 26 insertions, 16 deletions
diff --git a/debian/_buildscripts/local/build_module.sh b/debian/_buildscripts/local/build_module.sh
index 850651e42..280d5fb22 100755
--- a/debian/_buildscripts/local/build_module.sh
+++ b/debian/_buildscripts/local/build_module.sh
@@ -78,27 +78,37 @@ function search_module()
MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME"
else
- # Search in extra dependency folder
- LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^${CFG_EXTRA_DEPS_DIR}/(debian/)?||"`
- LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES/debian" | grep "^$LOC_BASENAME\$"`
- if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
- # Unique module found
+ # Search for a unique folder with the same name
+ if [ -d "${REPO_TDE_MAIN}/$LOC_MOD_NAME" ]; then
+ # Folder found
MODULE_FOUND="y"
- bool_EXTRADEP_MOD="y"
- MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH"
- MOD_GIT_PATH="$REPO_EXTRA_DEPENDENCIES/debian/$LOC_BASENAME"
- MOD_BUILD_PATH="$TDE_BUILD_DIR/$CFG_EXTRA_DEPS_DIR/$LOC_BASENAME"
+ MOD_NAME=$LOC_MOD_NAME
+ MOD_GIT_PATH="$REPO_TDE_MAIN/$MOD_NAME"
+ MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
+ MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME"
else
- # Search in metapackages folder
- LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^(metapackages/)?||"`
- LOC_MATCH=`ls "$REPO_TDE_MAIN/metapackages" | grep "^$LOC_BASENAME\$"`
+ # Search in extra dependency folder
+ LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^${CFG_EXTRA_DEPS_DIR}/(debian/)?||"`
+ LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES/debian" | grep "^$LOC_BASENAME\$"`
if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
# Unique module found
MODULE_FOUND="y"
- MOD_NAME="metapackages/$LOC_MATCH"
- MOD_GIT_PATH="$REPO_TDE_MAIN/metapackages/$LOC_BASENAME"
- MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
- MOD_BUILD_PATH="$TDE_BUILD_DIR/metapackages/$LOC_BASENAME"
+ bool_EXTRADEP_MOD="y"
+ MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH"
+ MOD_GIT_PATH="$REPO_EXTRA_DEPENDENCIES/debian/$LOC_BASENAME"
+ MOD_BUILD_PATH="$TDE_BUILD_DIR/$CFG_EXTRA_DEPS_DIR/$LOC_BASENAME"
+ else
+ # Search in metapackages folder
+ LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^(metapackages/)?||"`
+ LOC_MATCH=`ls "$REPO_TDE_MAIN/metapackages" | grep "^$LOC_BASENAME\$"`
+ if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
+ # Unique module found
+ MODULE_FOUND="y"
+ MOD_NAME="metapackages/$LOC_MATCH"
+ MOD_GIT_PATH="$REPO_TDE_MAIN/metapackages/$LOC_BASENAME"
+ MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
+ MOD_BUILD_PATH="$TDE_BUILD_DIR/metapackages/$LOC_BASENAME"
+ fi
fi
fi
fi