Fixed library generation

This commit is contained in:
WolverinDEV 2020-01-25 16:00:21 +01:00
parent 52c20efff5
commit 66ad46cef6
9 changed files with 22 additions and 11 deletions

View File

@ -1 +0,0 @@
/home/wolverindev/TeaSpeak/server/libraries/DataPipes/out/linux_amd64/lib/libDataPipes.so

View File

@ -1 +0,0 @@
/home/wolverindev/TeaSpeak/server/TeaSpeak/MusicBot/libs/libTeaMusic.so

View File

@ -1 +0,0 @@
/home/wolverindev/TeaSpeak/server/libraries/boringssl/out/linux_amd64/crypto/libcrypto.so

View File

@ -1 +0,0 @@
/home/wolverindev/TeaSpeak/server/libraries/jemalloc/out/linux_amd64/lib/libjemalloc.so.2

View File

@ -1 +0,0 @@
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0

View File

@ -1 +0,0 @@
/home/wolverindev/TeaSpeak/server/libraries/boringssl/out/linux_amd64/ssl/libssl.so

View File

@ -9,6 +9,9 @@
# "libTeaMusic.so"
# "libnice.so.10"
# "libpcre.so.3" (only for web)
# "libgobject-2.0.so.0" (only for web)
# "libglib-2.0.so.0" (only for web)
# "libffi.so.7"
[[ -z "${build_os_type}" ]] && { echo "missing build os type"; exit 1; }
[[ -z "${build_os_arch}" ]] && { echo "missing build os arch"; exit 1; }
@ -65,17 +68,30 @@ if ldd "../../../environment/TeaSpeakServer" | grep -q "libnice.so.10"; then
# Setting up libnice
library_path=$(realpath "${library_base}/libnice/${build_os_type}_${build_os_arch}/lib/libnice.so.10")
cp "$library_path" . || { echo "failed to copy libnice.so.10"; exit 1; }
cp "$library_path" libnice.so.10 || { echo "failed to copy libnice.so.10"; exit 1; }
glib_libs=$(realpath "${library_base}//glibc/${build_os_type}_${build_os_arch}/lib/"*"/")
cp "$glib_libs/libgobject-2.0.so.0" . || { echo "failed to copy libgobject-2.0.so.0"; exit 1; }
cp "$glib_libs/libgmodule-2.0.so.0" . || { echo "failed to copy libgmodule-2.0.so.0"; exit 1; }
cp "$glib_libs/libglib-2.0.so.0" . || { echo "failed to copy libglib-2.0.so.0"; exit 1; }
cp "$glib_libs/libgio-2.0.so.0" . || { echo "failed to copy libgio-2.0.so.0"; exit 1; }
cp "$glib_libs/libffi.so.7" . || { echo "failed to copy libffi.so.7"; exit 1; }
# "libgobject-2.0.so.0" (only for web)
# "libglib-2.0.so.0" (only for web)
# Setting up libpcre
query_system_link "libpcre.so.3"
cp "${library_path}" . || { echo "failed to copy libpcre.so.3"; exit 1; }
fi
# Fix rpaths
# Doing some prostprocessing
chmod 755 *
for file in *.so*; do
echo "Editing rpath for $file"
strip -s "$file"
patchelf --set-rpath "./libs/:./" "$file"
done
echo "All libraries have been linked successfully"
echo "All libraries have been copied successfully"

View File

@ -29,7 +29,8 @@ mv TeaSpeakServerTmp TeaSpeakServer
strip -s -p -v TeaSpeakServer || { echo "failed to strip symbols!"; exit 1; }
patchelf --set-rpath ./libs/ TeaSpeakServer || { echo "failed to set rpath!"; exit 1; }
tar --dereference -czvf "../${BUILD_FILENAME}" *
tar --dereference -cvf - * | gzip -9 "../${BUILD_FILENAME}" || { echo "failed to package server"; exit 1; }
cd ..
rm -r finalenv
./make_symbol.sh

2
shared

@ -1 +1 @@
Subproject commit a829f705d21267f2252d5aa84fb6213460b1ea33
Subproject commit 664b73910c99558f9ba14dd2f06dabe67b5f2f2a