From c6ba2b0ef2a395947b14bbdd08564d1740e4c606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Mon, 24 Jul 2023 01:34:29 +0200 Subject: [PATCH] Update RPM server packaging to include libnode. --- pkg-scripts/make-rpm-server | 19 +++++++++++-------- pkg-scripts/overte-server.spec | 3 +-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pkg-scripts/make-rpm-server b/pkg-scripts/make-rpm-server index 1f1f14f607..c86bb6e3f1 100755 --- a/pkg-scripts/make-rpm-server +++ b/pkg-scripts/make-rpm-server @@ -1,33 +1,36 @@ #!/bin/sh # Copyright 2020-2021 Vircadia contributors. -# Copyright 2022 Overte e.V. +# Copyright 2022-2023 Overte e.V. # SPDX-License-Identifier: Apache-2.0 if [ "$OVERTE" = "" ]; then - OVERTE=`realpath ..` - QT5_LIBS=`realpath ~/overte-files/qt/qt5-install/lib` + OVERTE=`realpath ..` fi +if [ "$OVERTE_USE_SYSTEM_QT" = "" ]; then + QT5_LIBS=`realpath ~/overte-files/qt/qt5-install/lib` +fi +VCPKG_INSTALL_ROOT=`grep VCPKG_INSTALL_ROOT $OVERTE/build/vcpkg.cmake | perl -ne 'm/set\(VCPKG_INSTALL_ROOT\s+\"(.*?)\"/; print $1'` VERSION=${RPMVERSION} if [ "$OVERTE_USE_SYSTEM_QT" = "" ]; then SOFILES=`ls \ $OVERTE/build/libraries/*/*.so \ + $VCPKG_INSTALL_ROOT/lib/libnode.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 \ + $VCPKG_INSTALL_ROOT/lib/libnode.so* \ | sed 's/\./\\\./g' \ | paste -d'|' -s` fi @@ -38,15 +41,14 @@ DEPENDS=mesa-libGL,`ls \ $OVERTE/build/domain-server/domain-server \ $OVERTE/build/tools/oven/oven \ $OVERTE/build/libraries/*/*.so \ + $VCPKG_INSTALL_ROOT/lib/libnode.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' \ @@ -64,6 +66,7 @@ DEPENDS=mesa-libGL,`ls \ $OVERTE/build/domain-server/domain-server \ $OVERTE/build/tools/oven/oven \ $OVERTE/build/libraries/*/*.so \ + $VCPKG_INSTALL_ROOT/lib/libnode.so* \ $OVERTE/build/assignment-client/plugins/*.so \ $OVERTE/build/assignment-client/plugins/*/*.so \ | xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \ @@ -79,6 +82,6 @@ fi sudo yum install chrpath -export VERSION DEPENDS OVERTE +export VERSION DEPENDS OVERTE QT5_LIBS VCPKG_INSTALL_ROOT rpmbuild --target $(uname -m) -bb ./overte-server.spec mv ~/rpmbuild/RPMS/$(uname -m)/*.rpm . diff --git a/pkg-scripts/overte-server.spec b/pkg-scripts/overte-server.spec index 70101311c3..2857526295 100644 --- a/pkg-scripts/overte-server.spec +++ b/pkg-scripts/overte-server.spec @@ -50,16 +50,15 @@ install -d $RPM_BUILD_ROOT/opt/overte/lib install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $OVERTE/build/libraries/*/*.so strip --strip-all $RPM_BUILD_ROOT/opt/overte/lib/* chrpath -d $RPM_BUILD_ROOT/opt/overte/lib/* +install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $VCPKG_INSTALL_ROOT/lib/libnode.so* %if "$OVERTE_USE_SYSTEM_QT" == "" install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Network.so.*.*.* install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Core.so.*.*.* install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Widgets.so.*.*.* install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Gui.so.*.*.* -install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Script.so.*.*.* install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5WebSockets.so.*.*.* install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Qml.so.*.*.* install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5Quick.so.*.*.* -install -m 0644 -t $RPM_BUILD_ROOT/opt/overte/lib $QT5_LIBS/libQt5ScriptTools.so.*.*.* %endif install -d $RPM_BUILD_ROOT/usr/lib/systemd/system install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $OVERTE/pkg-scripts/overte-assignment-client.service