Some build file fixes

This commit is contained in:
WolverinDEV 2020-12-02 23:40:36 +01:00
parent 4ca32f4453
commit db63248677
4 changed files with 19 additions and 13 deletions

View File

@ -11,6 +11,7 @@ cp env/buildVersion.txt .
rm -r env
mkdir env
cd env
[[ $? -ne 0 ]] && {
echo "Failed to create the env"
exit 1
@ -49,6 +50,12 @@ mv buildVersion.txt env/buildVersion.txt
exit 1
}
./make_symbol.sh || {
echo "Failed to generate debug symbols"
exit 1
}
./package_server.sh "${BUILD_PATH}" || {
echo "Failed to package server! ($?)"
exit 1

View File

@ -61,10 +61,4 @@ cp "${library_path}" . || { echo "failed to copy libteaspeak_rtc.so"; exit 1; }
# Doing some prostprocessing
chmod 755 *
for file in *.so*; do
echo "Editing rpath for $file"
strip --strip-all "$file"
patchelf --set-rpath "./libs/:./" "$file"
done
echo "All libraries have been copied successfully"

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=SC2207
BUILD_INFO=($(cat build_version.txt))
BUILD_FULL_NAME=${BUILD_INFO[0]}
BUILD_NAME=${BUILD_INFO[1]}
@ -22,18 +23,22 @@ echo -e "# Version: ${BUILD_FULL_NAME}
{\"build_name\": \"${BUILD_FULL_NAME}\", \"build_version\": \"${BUILD_NAME}\", \"build_index\": ${BUILD_VERSION}}" > buildVersion.txt
#Create a copy and save unstripped
cp TeaSpeakServer TeaSpeakServerTmp
rm TeaSpeakServer
mv TeaSpeakServerTmp TeaSpeakServer
echo "Stripping symbols"
strip -s -p -v TeaSpeakServer || { echo "failed to strip symbols!"; exit 1; }
patchelf --set-rpath ./libs/ TeaSpeakServer || { echo "failed to set rpath!"; exit 1; }
cd libs/ || exit 1
for file in *.so*; do
echo "Editing rpath for $file"
strip --strip-all "$file"
patchelf --set-rpath "./libs/:./" "$file"
done
cd ..
tar --dereference -cvf - * | gzip -f -9 > "../${BUILD_FILENAME}"
[[ $? -ne 0 ]] && { echo "failed to package server"; exit 1; }
cd ..
rm -r finalenv
./make_symbol.sh
echo "Package created (${BUILD_FILENAME})"

2
shared

@ -1 +1 @@
Subproject commit 2ba9288cc29f5be47a6862d5c1c3caec0bb6d377
Subproject commit 3eedb7d77220145b01f3fc7f11e32656b532dcbd