Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
4632071c
Commit
4632071c
authored
Dec 13, 2024
by
Boris Yumankulov
Committed by
Vitaly Lipatov
Jan 13, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play sunshine: added udev rule, systemd service and fix work on wayland (eterbug #17913)
parent
6aa1c1e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
5 deletions
+57
-5
sunshine.sh
play.d/sunshine.sh
+8
-5
sunshine.sh
repack.d/sunshine.sh
+49
-0
No files found.
play.d/sunshine.sh
View file @
4632071c
...
...
@@ -8,10 +8,13 @@ URL="https://app.lizardbyte.dev/Sunshine"
.
$(
dirname
$0
)
/common.sh
if
[
"
$VERSION
"
=
"*"
]
;
then
VERSION
=
"
$(
curl
-s
https://api.github.com/repos/LizardByte/Sunshine/releases/latest |
grep
-oP
'"tag_name": "\K(.*?)(?=")'
|
sed
's/G//g'
)
"
fi
PKGURL
=
https://github.com/LizardByte/Sunshine/releases/download/
$VERSION
/sunshine.AppImage
PKGURL
=
$(
get_github_version
"https://github.com/LizardByte/Sunshine/"
"sunshine-fedora-.*-amd64.rpm"
)
install_pkgurl
cat
<<
EOF
Note: run
# setcap cap_sys_admin+p
$(
readlink
-f
$(
command
-v
sunshine
))
to enable permissions for KMS capture (Capture of most Wayland-based desktop environments will fail unless this step is performed.)
EOF
repack.d/sunshine.sh
0 → 100755
View file @
4632071c
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
sunshine
.
$(
dirname
$0
)
/common.sh
# Sunshine needs access to uinput to create mouse and gamepad events.
cat
<<
EOF
| create_file /usr/lib/udev/rules.d/60-sunshine.rules
KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess
EOF
# Autostart service
cat
<<
EOF
| create_file /usr/lib/systemd/user/sunshine.service
[Unit]
Description=Self-hosted game stream host for Moonlight
StartLimitIntervalSec=500
StartLimitBurst=5
PartOf=graphical-session.target
Wants=xdg-desktop-autostart.target
After=xdg-desktop-autostart.target
[Service]
ExecStart=/usr/bin/sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=xdg-desktop-autostart.target
EOF
epm assure patchelf
BOOST_REPO_VERSION
=
$(
LC_ALL
=
C epm info boost |
grep
-oP
'^Version\s*:\s*\K[^\s]+'
|
sed
's/^[0-9]*://g'
|
cut
-d
'-'
-f
1
)
BOOST_FEDORA_VERSION
=
$(
ldd usr/bin/sunshine |
grep
-oP
'libboost_[^ ]+\.so\.\K[0-9]+\.[0-9]+\.[0-9]+'
|
sort
-u
)
BOOST_LIBS
=
$(
ldd usr/bin/sunshine |
grep
-oP
'libboost_[^ ]+\.so'
|
sort
-u
|
sed
's/libboost_//; s/\.so//'
)
# Replace fedora libboost to system libboost
for
lib
in
${
BOOST_LIBS
}
;
do
patchelf
--replace-needed
"libboost_
${
lib
}
.so.
${
BOOST_FEDORA_VERSION
}
"
"libboost_
${
lib
}
.so.
${
BOOST_REPO_VERSION
}
"
"usr/bin/sunshine"
done
# Commented until I know how to find out the version of the library in the repository
# patchelf --replace-needed libminiupnpc.so.1{7,8} "usr/bin/sunshine"
add_libs_requires
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment