|
|
|
@ -69,7 +69,19 @@ function search_module()
|
|
|
|
|
|
|
|
|
|
MODULE_FOUND="n"
|
|
|
|
|
|
|
|
|
|
# Search in GIT repository
|
|
|
|
|
# Check if it is a metapackage
|
|
|
|
|
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 metapackage found
|
|
|
|
|
MODULE_FOUND="y"
|
|
|
|
|
bool_METAPACKAGE_MOD="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"
|
|
|
|
|
else
|
|
|
|
|
# Search for unique GIT repository
|
|
|
|
|
LOC_MATCH=`sed -n "s|^\[submodule \"main/\([^\"]*\)\"\]$|\1|p" <"$REPO_TDE/.gitmodules" | grep "$LOC_MOD_NAME$"`
|
|
|
|
|
if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
|
|
|
|
|
# Unique module
|
|
|
|
@ -102,17 +114,6 @@ function search_module()
|
|
|
|
|
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
|
|
|
|
@ -131,6 +132,7 @@ bool_BUILD_FROM_GIT="n"
|
|
|
|
|
bool_BUILD_FROM_PATH="n"
|
|
|
|
|
bool_BUILD_LOCALLY="n"
|
|
|
|
|
bool_EXTRADEP_MOD="n"
|
|
|
|
|
bool_METAPACKAGE_MOD="n"
|
|
|
|
|
bool_SHOW_BUILD_LOGS="n"
|
|
|
|
|
bool_LOG_RESULT="n"
|
|
|
|
|
bool_SHELL_HOOK="n"
|
|
|
|
@ -359,7 +361,7 @@ if [ "$bool_COPY_MOD_SRC" = "y" ]; then
|
|
|
|
|
QUILT_PATCHES="debian/patches" quilt push -a >/dev/null
|
|
|
|
|
# Make sure patches are not reapplied in future local builds. This could stop pdebuild from working.
|
|
|
|
|
if [ -f "$MOD_BUILD_PATH/debian/patches/series" ]; then
|
|
|
|
|
cp /dev/null "$MOD_BUILD_PATH/debian/patches/series"
|
|
|
|
|
rm "$MOD_BUILD_PATH/debian/patches/series"
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "There must be one and only one module folder in \"$MOD_GIT_PATH\""
|
|
|
|
@ -373,7 +375,19 @@ if [ "$bool_EXTRADEP_MOD" != "y" -a "$bool_COPY_PKGING_FILES" = "y" ]; then
|
|
|
|
|
if [ -d "$MOD_BUILD_PKGING_PATH" ]; then
|
|
|
|
|
$SUDO_CMD rm -R $MOD_BUILD_PKGING_PATH
|
|
|
|
|
fi
|
|
|
|
|
if [ "$bool_METAPACKAGE_MOD" = "y" ]; then
|
|
|
|
|
cp -R "$MOD_GIT_PKGING_PATH/.." "$MOD_BUILD_PATH"
|
|
|
|
|
else
|
|
|
|
|
cp -R "$MOD_GIT_PKGING_PATH" "$MOD_BUILD_PKGING_PATH"
|
|
|
|
|
fi
|
|
|
|
|
if [[ -s "$MOD_BUILD_PKGING_PATH/patches/series" ]]; then
|
|
|
|
|
cd "$MOD_BUILD_PATH"
|
|
|
|
|
quilt push -a
|
|
|
|
|
# Make sure patches are not reapplied in future local builds. This could stop pdebuild from working.
|
|
|
|
|
if [ -f "$MOD_BUILD_PKGING_PATH/patches/series" ]; then
|
|
|
|
|
rm "$MOD_BUILD_PKGING_PATH/patches/series"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Default package name
|
|
|
|
|
package=$(basename $PWD)-trinity-$pkgver
|
|
|
|
|