mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Migration progressed far enough to get a .deb file out of this, installation has not yet been tested on any machine
This commit is contained in:
parent
00e8ce9bb8
commit
d8d740d369
10 changed files with 203 additions and 216 deletions
|
@ -1,5 +1,5 @@
|
|||
Collection of scripts to create server distribution packages. Most of these scripts assume
|
||||
use of the build script at https://github.com/daleglass/athena-builder, specifically that
|
||||
use of the build script at https://github.com/kasenvr/vircadia-builder, specifically that
|
||||
the following directory structure exists
|
||||
|
||||
base folder/
|
||||
|
@ -9,7 +9,7 @@ base folder/
|
|||
|
||||
These scripts assume that the current directory is the pkg-scripts folder inside of the source directory
|
||||
and that the base folder can be reached by going to "../..". This may not work if pkg-scripts is a symlink;
|
||||
adding an ATHENA=~/Athena to the beginning of the commandline will override where it looks for the base folder
|
||||
adding an VIRCADIA=~/Vircadia to the beginning of the commandline will override where it looks for the base folder
|
||||
|
||||
Ubuntu:
|
||||
DEBEMAIL="your-email@somewhere.com" DEBFULLNAME="Your Full Name" ./make-deb-server
|
||||
|
@ -30,24 +30,24 @@ Docker:
|
|||
|
||||
Results:
|
||||
The following directory structure is created for binaries:
|
||||
/opt/athena - executables
|
||||
/opt/athena/lib - private shared libraries required for executables
|
||||
/opt/athena/resources - files required by domain-server administrative website
|
||||
/opt/athena/plugins - files required by assignment-client, mainly for audio codecs
|
||||
/opt/vircadia - executables
|
||||
/opt/vircadia/lib - private shared libraries required for executables
|
||||
/opt/vircadia/resources - files required by domain-server administrative website
|
||||
/opt/vircadia/plugins - files required by assignment-client, mainly for audio codecs
|
||||
|
||||
The following systemd services are installed in /usr/lib/systemd/system:
|
||||
athena-assignment-client.service
|
||||
athena-domain-server.service
|
||||
athena-server.target - used to launch/shutdown the two prior services
|
||||
athena-assignment-client@.service
|
||||
athena-domain-server@.service
|
||||
athena-server@.target - used to launch/shutdown the two prior services
|
||||
vircadia-assignment-client.service
|
||||
vircadia-domain-server.service
|
||||
vircadia-server.target - used to launch/shutdown the two prior services
|
||||
vircadia-assignment-client@.service
|
||||
vircadia-domain-server@.service
|
||||
vircadia-server@.target - used to launch/shutdown the two prior services
|
||||
|
||||
The top three services in this list are the "normal" services that launch Athena
|
||||
The top three services in this list are the "normal" services that launch Vircadia
|
||||
in the typical fashion. The bottom three services are "template" services designed
|
||||
to permit multiple services to be installed and running on a single machine.
|
||||
|
||||
The script "/opt/athena/new-server serverName basePort" will do the necessary
|
||||
The script "/opt/vircadia/new-server serverName basePort" will do the necessary
|
||||
setup for a new domain with the specified server name and port. Upon installation
|
||||
the package will create and launch a domain named "default" at base port 40100.
|
||||
The domain name here has nothing to do with the name people will use to find your
|
||||
|
@ -55,6 +55,6 @@ Results:
|
|||
used to configure and run the domain on your server.
|
||||
|
||||
The server stores its files in the following locations:
|
||||
/var/lib/athena/.local - "unnamed" services (the default location for Athena servers)
|
||||
/var/lib/athena/serverName - "named" (template) domains
|
||||
/etc/opt/athena - environment variables when launching named domains
|
||||
/var/lib/vircadia/.local - "unnamed" services (the default location for Vircadia servers)
|
||||
/var/lib/vircadia/serverName - "named" (template) domains
|
||||
/etc/opt/vircadia - environment variables when launching named domains
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
#!/bin/sh
|
||||
# functions to assist with deb management
|
||||
|
||||
getAthenaEnabled()
|
||||
{
|
||||
return systemctl list-units --state=loaded \
|
||||
| grep -P "(athena-assignment-client|athena-domain-server|athena-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
getVircadiaEnabled()
|
||||
{
|
||||
return systemctl list-units --state=loaded \
|
||||
| grep -P "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
getAthenaActive()
|
||||
{
|
||||
return systemctl list-units \
|
||||
| grep -P "(athena-assignment-client|athena-domain-server|athena-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
getVircadiaActive()
|
||||
{
|
||||
return systemctl list-units \
|
||||
| grep -P "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
disableList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl disable
|
||||
}
|
||||
|
||||
enableList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl enable
|
||||
}
|
||||
|
||||
stopList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl stop
|
||||
}
|
||||
|
||||
startList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl start
|
||||
}
|
|
@ -15,8 +15,8 @@ if [ -f /var/lib/vircadia/.local -a "$(id -u)" = "0" ]; then
|
|||
fi
|
||||
|
||||
# realign pid
|
||||
THIS_ATHENA_PID=`ls -nd /var/lib/vircadia/.local | cut -f3 -d' '`
|
||||
CUR_ATHENA_PID=`getent passwd vircadia | cut -f3 -d: || true`
|
||||
THIS_VIRCADIA_PID=`ls -nd /var/lib/vircadia/.local | cut -f3 -d' '`
|
||||
CUR_VIRCADIA_PID=`getent passwd vircadia | cut -f3 -d: || true`
|
||||
if [ ! -z "$THIS_VIRCADIA_PID" -a "$THIS_VIRCADIA_PID" != "$CUR_VIRCADIA_PID" ]; then
|
||||
usermod -u ${THIS_VIRCADIA_PID} -o vircadia
|
||||
fi
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$ATHENA" = "" ]; then
|
||||
ATHENA=`realpath ../..`
|
||||
if [ "$VIRCADIA" = "" ]; then
|
||||
VIRCADIA=`realpath ../..`
|
||||
fi
|
||||
|
||||
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
|
||||
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7`
|
||||
VERSION=0.86.0-k2-$GITDATE-$GITCOMMIT
|
||||
GITDATE=`git -C $VIRCADIA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
|
||||
GITCOMMIT=`git -C $VIRCADIA/source rev-parse HEAD | cut -c 1-7`
|
||||
VERSION=2020.2.0-asteria-$GITDATE-$GITCOMMIT
|
||||
|
||||
sudo apt-get install chrpath binutils dh-make
|
||||
|
||||
|
@ -15,31 +15,29 @@ rm -r temp-make-deb
|
|||
mkdir -p $DEB_BUILD_ROOT
|
||||
|
||||
# copy the files over
|
||||
cp $ATHENA/build/assignment-client/assignment-client $DEB_BUILD_ROOT
|
||||
cp $ATHENA/build/domain-server/domain-server $DEB_BUILD_ROOT
|
||||
cp $ATHENA/build/tools/oven/oven $DEB_BUILD_ROOT
|
||||
cp $ATHENA/build/libraries/*/*.so $DEB_BUILD_ROOT
|
||||
#cp $ATHENA/build/ice-server/ice-server $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/build/assignment-client/assignment-client $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/build/domain-server/domain-server $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/build/tools/oven/oven $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/build/libraries/*/*.so $DEB_BUILD_ROOT
|
||||
#cp $VIRCADIA/build/ice-server/ice-server $DEB_BUILD_ROOT
|
||||
chrpath -d $DEB_BUILD_ROOT/*
|
||||
cp $ATHENA/qt5-install/lib/libQt5Network.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5Core.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5Script.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DEB_BUILD_ROOT
|
||||
chmod +x $DEB_BUILD_ROOT/*.so.*.*.*
|
||||
strip --strip-all $DEB_BUILD_ROOT/*
|
||||
cp $ATHENA/source/pkg-scripts/new-server $DEB_BUILD_ROOT
|
||||
cp -a $ATHENA/source/domain-server/resources $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/source/pkg-scripts/new-server $DEB_BUILD_ROOT
|
||||
cp -a $VIRCADIA/source/domain-server/resources $DEB_BUILD_ROOT
|
||||
find $DEB_BUILD_ROOT/resources -name ".gitignore" -delete
|
||||
find $DEB_BUILD_ROOT/resources -type f -executable -exec sh -c 'chmod -x {}' \;
|
||||
cp $ATHENA/source/README.md $DEB_BUILD_ROOT
|
||||
cp $ATHENA/source/README_hifi.md $DEB_BUILD_ROOT
|
||||
cp -a $ATHENA/build/assignment-client/plugins $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/source/README.md $DEB_BUILD_ROOT
|
||||
cp $VIRCADIA/source/README_hifi.md $DEB_BUILD_ROOT
|
||||
cp -a $VIRCADIA/build/assignment-client/plugins $DEB_BUILD_ROOT
|
||||
strip --strip-all $DEB_BUILD_ROOT/plugins/*.so
|
||||
strip --strip-all $DEB_BUILD_ROOT/plugins/*/*.so
|
||||
|
||||
|
@ -47,20 +45,20 @@ strip --strip-all $DEB_BUILD_ROOT/plugins/*/*.so
|
|||
cd $DEB_BUILD_ROOT
|
||||
dh_make -p vircadia-server_$VERSION-0ubuntu1 -c apache -s --createorig -y
|
||||
|
||||
cp $ATHENA/source/pkg-scripts/vircadia-assignment-client.service debian
|
||||
cp $ATHENA/source/pkg-scripts/vircadia-assignment-client@.service debian
|
||||
cp $ATHENA/source/pkg-scripts/vircadia-domain-server.service debian
|
||||
cp $ATHENA/source/pkg-scripts/vircadia-domain-server@.service debian
|
||||
#cp $ATHENA/source/pkg-scripts/vircadia-ice-server.service debian
|
||||
#cp $ATHENA/source/pkg-scripts/vircadia-ice-server@.service debian
|
||||
cp $ATHENA/source/pkg-scripts/vircadia-server.target debian
|
||||
cp $ATHENA/source/pkg-scripts/vircadia-server@.target debian
|
||||
cp $VIRCADIA/source/pkg-scripts/vircadia-assignment-client.service debian
|
||||
cp $VIRCADIA/source/pkg-scripts/vircadia-assignment-client@.service debian
|
||||
cp $VIRCADIA/source/pkg-scripts/vircadia-domain-server.service debian
|
||||
cp $VIRCADIA/source/pkg-scripts/vircadia-domain-server@.service debian
|
||||
#cp $VIRCADIA/source/pkg-scripts/vircadia-ice-server.service debian
|
||||
#cp $VIRCADIA/source/pkg-scripts/vircadia-ice-server@.service debian
|
||||
cp $VIRCADIA/source/pkg-scripts/vircadia-server.target debian
|
||||
cp $VIRCADIA/source/pkg-scripts/vircadia-server@.target debian
|
||||
|
||||
cp $ATHENA/source/pkg-scripts/server-control debian/control
|
||||
cp $ATHENA/source/pkg-scripts/server-prerm debian/prerm
|
||||
cp $ATHENA/source/pkg-scripts/server-postinst debian/postinst
|
||||
cp $ATHENA/source/pkg-scripts/server-postrm debian/postrm
|
||||
cp $ATHENA/source/LICENSE debian/copyright
|
||||
cp $VIRCADIA/source/pkg-scripts/server-control debian/control
|
||||
cp $VIRCADIA/source/pkg-scripts/server-prerm debian/prerm
|
||||
cp $VIRCADIA/source/pkg-scripts/server-postinst debian/postinst
|
||||
cp $VIRCADIA/source/pkg-scripts/server-postrm debian/postrm
|
||||
cp $VIRCADIA/source/LICENSE debian/copyright
|
||||
|
||||
echo /etc/opt/vircadia > debian/dirs
|
||||
echo /var/lib/vircadia >> debian/dirs
|
||||
|
@ -88,12 +86,14 @@ done
|
|||
find resources -type f -exec sh -c 'echo {} opt/vircadia/$(dirname "{}") >> debian/install' \;
|
||||
find plugins -type f -exec sh -c 'echo {} opt/vircadia/$(dirname "{}") >> debian/install' \;
|
||||
|
||||
SOFILES=`ls *.so *.so.*.*.* | sed 's/\./\\\./g' | paste -d'|' -s`
|
||||
SOFILES=`ls *.so *.so.*.*.* | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s`
|
||||
|
||||
DEPENDS=`find * -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d',' -s`
|
||||
DEPENDS=`find * -path debian -prune -o -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; \
|
||||
| awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" \
|
||||
| xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d',' -s`
|
||||
|
||||
cp $ATHENA/source/pkg-scripts/server-rules debian/rules
|
||||
sed "s/{DEPENDS}/$DEPENDS/" $ATHENA/source/pkg-scripts/server-control > debian/control
|
||||
cp $VIRCADIA/source/pkg-scripts/server-rules debian/rules
|
||||
sed "s/{DEPENDS}/$DEPENDS/" $VIRCADIA/source/pkg-scripts/server-control > debian/control
|
||||
|
||||
dpkg-buildpackage -us -uc
|
||||
|
||||
|
|
|
@ -1,53 +1,51 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$ATHENA" = "" ]; then
|
||||
ATHENA=`realpath ../..`
|
||||
if [ "$VIRCADIA" = "" ]; then
|
||||
VIRCADIA=`realpath ../..`
|
||||
fi
|
||||
|
||||
GITSRC=`git -C $ATHENA/source config --get remote.origin.url | cut -d':' -f 2`
|
||||
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
|
||||
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7`
|
||||
GITSRC=`git -C $VIRCADIA/source config --get remote.origin.url | cut -d':' -f 2`
|
||||
GITDATE=`git -C $VIRCADIA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
|
||||
GITCOMMIT=`git -C $VIRCADIA/source rev-parse HEAD | cut -c 1-7`
|
||||
|
||||
sudo apt-get install chrpath binutils
|
||||
|
||||
DOCK_BUILD_ROOT=temp-make-dock
|
||||
rm -r temp-make-dock
|
||||
mkdir -p $DOCK_BUILD_ROOT
|
||||
cp $ATHENA/source/pkg-scripts/Dockerfile.templ $DOCK_BUILD_ROOT/Dockerfile
|
||||
cp $ATHENA/source/pkg-scripts/docker-entrypoint.sh $DOCK_BUILD_ROOT/entrypoint.sh
|
||||
cp $ATHENA/source/pkg-scripts/docker-vircadia-supervisor.conf $DOCK_BUILD_ROOT/vircadia.conf
|
||||
cp $VIRCADIA/source/pkg-scripts/Dockerfile.templ $DOCK_BUILD_ROOT/Dockerfile
|
||||
cp $VIRCADIA/source/pkg-scripts/docker-entrypoint.sh $DOCK_BUILD_ROOT/entrypoint.sh
|
||||
cp $VIRCADIA/source/pkg-scripts/docker-vircadia-supervisor.conf $DOCK_BUILD_ROOT/vircadia.conf
|
||||
|
||||
# copy the files over
|
||||
mkdir -p $DOCK_BUILD_ROOT/opt
|
||||
cp $ATHENA/build/assignment-client/assignment-client $DOCK_BUILD_ROOT/opt
|
||||
cp $ATHENA/build/domain-server/domain-server $DOCK_BUILD_ROOT/opt
|
||||
cp $ATHENA/build/tools/oven/oven $DOCK_BUILD_ROOT/opt
|
||||
#cp $ATHENA/build/ice-server/ice-server $DOCK_BUILD_ROOT/opt
|
||||
cp $VIRCADIA/build/assignment-client/assignment-client $DOCK_BUILD_ROOT/opt
|
||||
cp $VIRCADIA/build/domain-server/domain-server $DOCK_BUILD_ROOT/opt
|
||||
cp $VIRCADIA/build/tools/oven/oven $DOCK_BUILD_ROOT/opt
|
||||
#cp $VIRCADIA/build/ice-server/ice-server $DOCK_BUILD_ROOT/opt
|
||||
strip --strip-all $DOCK_BUILD_ROOT/opt/*
|
||||
chrpath -d $DOCK_BUILD_ROOT/opt/*
|
||||
|
||||
cp -a $ATHENA/build/assignment-client/plugins $DOCK_BUILD_ROOT/opt
|
||||
cp -a $VIRCADIA/build/assignment-client/plugins $DOCK_BUILD_ROOT/opt
|
||||
strip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*.so
|
||||
chrpath -d $DOCK_BUILD_ROOT/opt/plugins/*.so
|
||||
strip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*/*.so
|
||||
chrpath -d $DOCK_BUILD_ROOT/opt/plugins/*/*.so
|
||||
|
||||
cp -a $ATHENA/source/domain-server/resources $DOCK_BUILD_ROOT/opt
|
||||
cp -a $VIRCADIA/source/domain-server/resources $DOCK_BUILD_ROOT/opt
|
||||
find $DOCK_BUILD_ROOT/opt/resources -name ".gitignore" -delete
|
||||
find $DOCK_BUILD_ROOT/opt/resources -type f -executable -exec sh -c 'chmod -x {}' \;
|
||||
|
||||
mkdir -p $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/build/libraries/*/*.so $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Network.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Core.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Script.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/build/libraries/*/*.so $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
cp $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DOCK_BUILD_ROOT/lib
|
||||
chmod +x $DOCK_BUILD_ROOT/lib/*
|
||||
strip --strip-all $DOCK_BUILD_ROOT/lib/*
|
||||
chrpath -d $DOCK_BUILD_ROOT/lib/*
|
||||
|
|
|
@ -1,44 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$ATHENA" = "" ]; then
|
||||
ATHENA=`realpath ../..`
|
||||
if [ "$VIRCADIA" = "" ]; then
|
||||
VIRCADIA=`realpath ../..`
|
||||
fi
|
||||
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
|
||||
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7`
|
||||
VERSION=0.86.0_K2_${GITDATE}_${GITCOMMIT}
|
||||
GITDATE=`git -C $VIRCADIA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
|
||||
GITCOMMIT=`git -C $VIRCADIA/source rev-parse HEAD | cut -c 1-7`
|
||||
VERSION=2020.2.0_ASTERIA_${GITDATE}_${GITCOMMIT}
|
||||
|
||||
SOFILES=`ls \
|
||||
$ATHENA/build/libraries/*/*.so \
|
||||
$ATHENA/qt5-install/lib/libQt5Network.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Core.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Script.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
|
||||
$ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* \
|
||||
$VIRCADIA/build/libraries/*/*.so \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
|
||||
| sed 's/\./\\\./g' \
|
||||
| paste -d'|' -s`
|
||||
|
||||
DEPENDS=mesa-libGL,`ls \
|
||||
$ATHENA/build/assignment-client/assignment-client \
|
||||
$ATHENA/build/domain-server/domain-server \
|
||||
$ATHENA/build/tools/oven/oven \
|
||||
$ATHENA/build/libraries/*/*.so \
|
||||
$ATHENA/qt5-install/lib/libQt5Network.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Core.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Script.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* \
|
||||
$ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
|
||||
$ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* \
|
||||
$ATHENA/build/assignment-client/plugins/*.so \
|
||||
$ATHENA/build/assignment-client/plugins/*/*.so \
|
||||
$VIRCADIA/build/assignment-client/assignment-client \
|
||||
$VIRCADIA/build/domain-server/domain-server \
|
||||
$VIRCADIA/build/tools/oven/oven \
|
||||
$VIRCADIA/build/libraries/*/*.so \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* \
|
||||
$VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
|
||||
$VIRCADIA/build/assignment-client/plugins/*.so \
|
||||
$VIRCADIA/build/assignment-client/plugins/*/*.so \
|
||||
| xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \
|
||||
| awk '{print $2}' \
|
||||
| sort | uniq \
|
||||
|
@ -51,6 +47,6 @@ DEPENDS=mesa-libGL,`ls \
|
|||
|
||||
sudo yum install chrpath
|
||||
|
||||
export VERSION DEPENDS ATHENA
|
||||
export VERSION DEPENDS VIRCADIA
|
||||
rpmbuild --target x86_64 -bb ./vircadia-server.spec
|
||||
mv ~/rpmbuild/RPMS/x86_64/*.rpm .
|
||||
|
|
|
@ -4,7 +4,7 @@ Priority: optional
|
|||
Maintainer: Heather Anderson <heath@odysseus.anderson.name>
|
||||
Build-Depends: debhelper (>= 10)
|
||||
Standards-Version: 4.1.2
|
||||
Homepage: https://www.projectathena.dev
|
||||
Homepage: https://vircadia.com
|
||||
Vcs-Git: https://github.com/kasenvr/project-athena.git
|
||||
Vcs-Browser: https://github.com/kasenvr/project-athena
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# postinst script for vircadia-server
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
. ./deb-functions
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -18,6 +17,67 @@ set -e
|
|||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
getAthenaEnabled()
|
||||
{
|
||||
return systemctl list-units --state=loaded \
|
||||
| grep -P "(athena-assignment-client|athena-domain-server|athena-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
getVircadiaEnabled()
|
||||
{
|
||||
return systemctl list-units --state=loaded \
|
||||
| grep -P "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
getAthenaActive()
|
||||
{
|
||||
return systemctl list-units \
|
||||
| grep -P "(athena-assignment-client|athena-domain-server|athena-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
getVircadiaActive()
|
||||
{
|
||||
return systemctl list-units \
|
||||
| grep -P "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)" \
|
||||
| cut -d' ' -f 1 \
|
||||
| paste -s -d'|'
|
||||
}
|
||||
|
||||
disableList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl disable
|
||||
}
|
||||
|
||||
enableList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl enable
|
||||
}
|
||||
|
||||
stopList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl stop
|
||||
}
|
||||
|
||||
startList()
|
||||
{
|
||||
echo $1 \
|
||||
| xargs -d'|' \
|
||||
| systemctl start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# postrm script for vircadia-server
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
. ./deb-functions
|
||||
|
||||
set -e
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ATHENA=~/Athena rpmbuild --target x86_64 -bb vircadia-server.spec
|
||||
#VIRCADIA=~/Vircadia rpmbuild --target x86_64 -bb vircadia-server.spec
|
||||
%define version %{lua:print(os.getenv("VERSION"))}
|
||||
%define depends %{lua:print(os.getenv("DEPENDS"))}
|
||||
|
||||
|
@ -8,8 +8,8 @@ Release: 1%{?dist}
|
|||
Summary: Vircadia metaverse platform, based on the High Fidelity Engine.
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://projectathena.io
|
||||
Source0: https://github.com/daleglass/athena-builder/blob/master/athena_builder
|
||||
URL: https://vircadia.com
|
||||
Source0: https://github.com/kasenvr/vircadia-builder/blob/master/vircadia-builder
|
||||
|
||||
#BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: chrpath
|
||||
|
@ -32,38 +32,36 @@ Vircadia allows creation and sharing of VR experiences.
|
|||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT/opt/vircadia
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $ATHENA/build/assignment-client/assignment-client
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $ATHENA/build/domain-server/domain-server
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $ATHENA/build/tools/oven/oven
|
||||
#install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $ATHENA/build/ice-server/ice-server
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/assignment-client/assignment-client
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/domain-server/domain-server
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/tools/oven/oven
|
||||
#install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/ice-server/ice-server
|
||||
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/*
|
||||
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/*
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $ATHENA/source/pkg-scripts/new-server
|
||||
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/source/pkg-scripts/new-server
|
||||
install -d $RPM_BUILD_ROOT/opt/vircadia/lib
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/build/libraries/*/*.so
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/build/libraries/*/*.so
|
||||
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/lib/*
|
||||
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/lib/*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Network.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Core.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Script.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.*
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.*
|
||||
install -d $RPM_BUILD_ROOT/usr/lib/systemd/system
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-assignment-client.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-assignment-client@.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-domain-server.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-domain-server@.service
|
||||
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-ice-server.service
|
||||
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-ice-server@.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-server.target
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/vircadia-server@.target
|
||||
cp -a $ATHENA/source/domain-server/resources $RPM_BUILD_ROOT/opt/vircadia
|
||||
cp -a $ATHENA/build/assignment-client/plugins $RPM_BUILD_ROOT/opt/vircadia
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-assignment-client.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-assignment-client@.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-domain-server.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-domain-server@.service
|
||||
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-ice-server.service
|
||||
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-ice-server@.service
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-server.target
|
||||
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-server@.target
|
||||
cp -a $VIRCADIA/source/domain-server/resources $RPM_BUILD_ROOT/opt/vircadia
|
||||
cp -a $VIRCADIA/build/assignment-client/plugins $RPM_BUILD_ROOT/opt/vircadia
|
||||
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/plugins/*.so
|
||||
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/plugins/*/*.so
|
||||
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/plugins/*.so
|
||||
|
@ -72,7 +70,7 @@ find $RPM_BUILD_ROOT/opt/vircadia/resources -name ".gitignore" -delete
|
|||
|
||||
|
||||
%files
|
||||
%license $ATHENA/source/LICENSE
|
||||
%license $VIRCADIA/source/LICENSE
|
||||
/opt/vircadia
|
||||
/usr/lib/systemd/system
|
||||
|
||||
|
|
Loading…
Reference in a new issue