mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-06 21:23:22 +02:00
45 lines
1.3 KiB
Bash
Executable file
45 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright 2020-2021 Vircadia contributors.
|
|
# Copyright 2022-2025 Overte e.V.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if [ "$OVERTE" = "" ]; then
|
|
OVERTE=`realpath ..`
|
|
fi
|
|
|
|
# Remove minus character from version numbers, because rpmtool doesn't allow them.
|
|
VERSION=${RPMVERSION//-}
|
|
|
|
# TODO: Handle Qt built by Conan
|
|
|
|
SOFILES=`ls \
|
|
$OVERTE/build/libraries/*/*.so \
|
|
$OVERTE/build/conanlibs/Release/libnode.so* \
|
|
| sed 's/\./\\\./g' \
|
|
| paste -d'|' -s`
|
|
|
|
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/conanlibs/Release/libnode.so* \
|
|
$OVERTE/build/conanlibs/Release/libtbb.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 \
|
|
| grep -E -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`
|
|
|
|
sudo yum install chrpath
|
|
|
|
export VERSION DEPENDS OVERTE QT5_LIBS
|
|
rpmbuild --target $(uname -m) -bb ./overte-server.spec
|
|
mv ~/rpmbuild/RPMS/$(uname -m)/*.rpm .
|