mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-05 14:52:30 +02:00
84 lines
2.6 KiB
Bash
Executable file
84 lines
2.6 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright 2020-2021 Vircadia contributors.
|
|
# Copyright 2022 Overte e.V.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if [ "$OVERTE" = "" ]; then
|
|
OVERTE=`realpath ..`
|
|
QT5_LIBS=`realpath ~/overte-files/qt/qt5-install/lib`
|
|
fi
|
|
|
|
VERSION=${RPMVERSION}
|
|
|
|
if [ "$OVERTE_USE_SYSTEM_QT" = "" ]; then
|
|
SOFILES=`ls \
|
|
$OVERTE/build/libraries/*/*.so \
|
|
$OVERTE/qt5-install/lib/libQt5Network.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5Core.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5Widgets.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5Gui.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5Script.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5WebSockets.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5Qml.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5Quick.so.*.*.* \
|
|
$OVERTE/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
|
|
| sed 's/\./\\\./g' \
|
|
| paste -d'|' -s`
|
|
else
|
|
SOFILES=`ls \
|
|
$OVERTE/build/libraries/*/*.so \
|
|
| sed 's/\./\\\./g' \
|
|
| paste -d'|' -s`
|
|
fi
|
|
|
|
if [ "$OVERTE_USE_SYSTEM_QT" = "" ]; then
|
|
DEPENDS=mesa-libGL,`ls \
|
|
$OVERTE/build/assignment-client/assignment-client \
|
|
$OVERTE/build/domain-server/domain-server \
|
|
$OVERTE/build/tools/oven/oven \
|
|
$OVERTE/build/libraries/*/*.so \
|
|
$QT5_LIBS/libQt5Network.so.*.*.* \
|
|
$QT5_LIBS/libQt5Core.so.*.*.* \
|
|
$QT5_LIBS/libQt5Widgets.so.*.*.* \
|
|
$QT5_LIBS/libQt5Gui.so.*.*.* \
|
|
$QT5_LIBS/libQt5Script.so.*.*.* \
|
|
$QT5_LIBS/libQt5WebSockets.so.*.*.* \
|
|
$QT5_LIBS/libQt5Qml.so.*.*.* \
|
|
$QT5_LIBS/libQt5Quick.so.*.*.* \
|
|
$QT5_LIBS/libQt5ScriptTools.so.*.*.* \
|
|
$OVERTE/build/assignment-client/plugins/*.so \
|
|
$OVERTE/build/assignment-client/plugins/*/*.so \
|
|
| xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \
|
|
| awk '{print $2}' \
|
|
| sort | uniq \
|
|
| egrep -v "^($SOFILES)$" \
|
|
| grep -v ^libGL \
|
|
| xargs -I {} sh -c "ldconfig -p | grep {} | tr ' ' '\n' | grep /" \
|
|
| xargs rpm -qf --queryformat "%{NAME}\n" \
|
|
| sort | uniq \
|
|
| paste -d',' -s`
|
|
else
|
|
DEPENDS=mesa-libGL,`ls \
|
|
$OVERTE/build/assignment-client/assignment-client \
|
|
$OVERTE/build/domain-server/domain-server \
|
|
$OVERTE/build/tools/oven/oven \
|
|
$OVERTE/build/libraries/*/*.so \
|
|
$OVERTE/build/assignment-client/plugins/*.so \
|
|
$OVERTE/build/assignment-client/plugins/*/*.so \
|
|
| xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \
|
|
| awk '{print $2}' \
|
|
| sort | uniq \
|
|
| egrep -v "^($SOFILES)$" \
|
|
| grep -v ^libGL \
|
|
| xargs -I {} sh -c "ldconfig -p | grep {} | tr ' ' '\n' | grep /" \
|
|
| xargs rpm -qf --queryformat "%{NAME}\n" \
|
|
| sort | uniq \
|
|
| paste -d',' -s`
|
|
fi
|
|
|
|
sudo yum install chrpath
|
|
|
|
export VERSION DEPENDS OVERTE
|
|
rpmbuild --target $(uname -m) -bb ./overte-server.spec
|
|
mv ~/rpmbuild/RPMS/$(uname -m)/*.rpm .
|