install systemd service for debian packages

This commit is contained in:
loki
2021-07-03 18:13:05 +02:00
parent 355df9a615
commit e169259f6f
2 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ else()
third-party/glad/include) third-party/glad/include)
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH) if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/sunshine") set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif() endif()
configure_file(gen-deb.in gen-deb @ONLY) configure_file(gen-deb.in gen-deb @ONLY)
configure_file(sunshine.service.in sunshine.service @ONLY) configure_file(sunshine.service.in sunshine.service @ONLY)
+9 -8
View File
@@ -10,15 +10,17 @@ if [ -d package-deb ]; then
rm -rf package-deb rm -rf package-deb
fi fi
export DEBIAN=package-deb/sunshine/DEBIAN export DEBIAN=@CMAKE_CURRENT_BINARY_DIR@/package-deb/sunshine/DEBIAN
export RULES=package-deb/sunshine/etc/udev/rules.d export RULES=@CMAKE_CURRENT_BINARY_DIR@/package-deb/sunshine/etc/udev/rules.d
export BIN=package-deb/sunshine/usr/bin export BIN=@CMAKE_CURRENT_BINARY_DIR@/package-deb/sunshine/usr/bin
export ASSETS=package-deb/sunshine/etc/sunshine export SERVICE=@CMAKE_CURRENT_BINARY_DIR@/package-deb/sunshine/usr/lib/systemd/user
export ASSETS=@CMAKE_CURRENT_BINARY_DIR@/package-deb/sunshine/etc/sunshine
mkdir -p $DEBIAN mkdir -p $DEBIAN
mkdir -p $RULES mkdir -p $RULES
mkdir -p $BIN mkdir -p $BIN
mkdir -p $ASSETS mkdir -p $ASSETS/shaders
mkdir -p $SERVICE
if [ ! -f sunshine ]; then if [ ! -f sunshine ]; then
echo "Error: Can't find sunshine" echo "Error: Can't find sunshine"
@@ -35,7 +37,7 @@ Package: sunshine
Architecture: amd64 Architecture: amd64
Maintainer: @loki Maintainer: @loki
Priority: optional Priority: optional
Version: 0.8.0 Version: 0.8.1
Depends: libssl1.1, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0, libboost-log1.67.0 | libboost-log1.71.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2 Depends: libssl1.1, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0, libboost-log1.67.0 | libboost-log1.71.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2
Description: Gamestream host for Moonlight Description: Gamestream host for Moonlight
EOF EOF
@@ -71,11 +73,10 @@ cat << 'EOF' > $RULES/85-sunshine-rules.rules
KERNEL=="uinput", GROUP="input", MODE="0660" KERNEL=="uinput", GROUP="input", MODE="0660"
EOF EOF
mkdir -p $ASSETS/shaders
cp sunshine $BIN/sunshine cp sunshine $BIN/sunshine
cp @CMAKE_CURRENT_SOURCE_DIR@/assets/apps_linux.json $ASSETS/apps_linux.json cp @CMAKE_CURRENT_SOURCE_DIR@/assets/apps_linux.json $ASSETS/apps_linux.json
cp @CMAKE_CURRENT_SOURCE_DIR@/assets/sunshine.conf $ASSETS/sunshine.conf cp @CMAKE_CURRENT_SOURCE_DIR@/assets/sunshine.conf $ASSETS/sunshine.conf
cp @CMAKE_CURRENT_BINARY_DIR@/sunshine.service $SERVICE/sunshine.service
cp -r @CMAKE_CURRENT_SOURCE_DIR@/assets/web $ASSETS/web cp -r @CMAKE_CURRENT_SOURCE_DIR@/assets/web $ASSETS/web
cp -r @CMAKE_CURRENT_SOURCE_DIR@/assets/shaders/opengl $ASSETS/shaders/opengl cp -r @CMAKE_CURRENT_SOURCE_DIR@/assets/shaders/opengl $ASSETS/shaders/opengl