ci(flatpak): add flatpak builder lint (#2799)
This commit is contained in:
parent
acccacf861
commit
37b60fb2c1
18 changed files with 235 additions and 52 deletions
3
.gitattributes
vendored
3
.gitattributes
vendored
|
|
@ -1,3 +1,6 @@
|
|||
# ensure dockerfiles are checked out with LF line endings
|
||||
Dockerfile text eol=lf
|
||||
*.dockerfile text eol=lf
|
||||
|
||||
# ensure flatpak lint json files are checked out with LF line endings
|
||||
*flatpak-lint-*.json text eol=lf
|
||||
|
|
|
|||
73
.github/workflows/CI.yml
vendored
73
.github/workflows/CI.yml
vendored
|
|
@ -72,6 +72,8 @@ jobs:
|
|||
matrix: ${{ steps.flatpak_matrix.outputs.matrix }}
|
||||
|
||||
build_linux_flatpak:
|
||||
env:
|
||||
APP_ID: dev.lizardbyte.app.Sunshine
|
||||
name: Linux Flatpak
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [setup_release, setup_flatpak_matrix]
|
||||
|
|
@ -157,20 +159,75 @@ jobs:
|
|||
-DSUNSHINE_CONFIGURE_ONLY=ON \
|
||||
..
|
||||
|
||||
- name: Debug Manifest
|
||||
working-directory: build
|
||||
run: |
|
||||
cat ${APP_ID}.yml
|
||||
|
||||
- name: Build Linux Flatpak
|
||||
working-directory: build
|
||||
run: |
|
||||
sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
|
||||
--stop-at=cuda build-sunshine dev.lizardbyte.sunshine.yml'
|
||||
sudo su $(whoami) -c "flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
|
||||
--stop-at=cuda build-sunshine ${APP_ID}.yml"
|
||||
cp -r .flatpak-builder copy-of-flatpak-builder
|
||||
sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
|
||||
build-sunshine dev.lizardbyte.sunshine.yml'
|
||||
sudo su $(whoami) -c "flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
|
||||
build-sunshine ${APP_ID}.yml"
|
||||
rm -rf .flatpak-builder
|
||||
mv copy-of-flatpak-builder .flatpak-builder
|
||||
sudo su $(whoami) -c 'flatpak build-bundle --arch=${{ matrix.arch }} ./repo \
|
||||
../artifacts/sunshine_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine'
|
||||
sudo su $(whoami) -c 'flatpak build-bundle --runtime --arch=${{ matrix.arch }} ./repo \
|
||||
../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine.Debug'
|
||||
sudo su $(whoami) -c "flatpak build-bundle --arch=${{ matrix.arch }} ./repo \
|
||||
../artifacts/sunshine_${{ matrix.arch }}.flatpak ${APP_ID}"
|
||||
sudo su $(whoami) -c "flatpak build-bundle --runtime --arch=${{ matrix.arch }} ./repo \
|
||||
../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak ${APP_ID}.Debug"
|
||||
|
||||
- name: Lint Flatpak
|
||||
working-directory: build
|
||||
run: |
|
||||
echo "Linting flatpak manifest"
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
|
||||
manifest ${APP_ID}.yml > _flatpak-lint-exceptions_manifest.json || true
|
||||
|
||||
echo "Linting flatpak repo"
|
||||
# TODO: add arg
|
||||
# --mirror-screenshots-url=https://dl.flathub.org/media \
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
|
||||
repo repo > _flatpak-lint-exceptions_repo.json || true
|
||||
|
||||
checks=(manifest repo)
|
||||
exit_code=0
|
||||
|
||||
# check if files are equal
|
||||
for check in "${checks[@]}"; do
|
||||
echo "Validating $check"
|
||||
|
||||
# load baseline and result files
|
||||
baseline="${{ github.workspace }}/packaging/linux/flatpak/flatpak-lint-baseline_${check}.json"
|
||||
result="_flatpak-lint-exceptions_${check}.json"
|
||||
|
||||
# Extract errors from both JSON files
|
||||
readarray -t result_errors < <(jq -r '.errors[]' "$result")
|
||||
readarray -t baseline_errors < <(jq -r '.errors[]' "$baseline")
|
||||
|
||||
# Loop through result errors and check against baseline errors
|
||||
for error in "${result_errors[@]}"; do
|
||||
if printf '%s\n' "${baseline_errors[@]}" | grep -q -F "$error"; then
|
||||
echo "::warning:: '$error'"
|
||||
else
|
||||
echo "::error:: '$error'"
|
||||
exit_code=1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# if exit code is not 0, print results
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
echo "Manifest lint results:"
|
||||
cat _flatpak-lint-exceptions_manifest.json
|
||||
echo "Repo lint results:"
|
||||
cat _flatpak-lint-exceptions_repo.json
|
||||
fi
|
||||
|
||||
# exit with the correct code
|
||||
exit $exit_code
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ project(Sunshine VERSION 0.0.0
|
|||
DESCRIPTION "Self-hosted game stream host for Moonlight"
|
||||
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
|
||||
|
||||
set(PROJECT_LICENSE "GPL-3.0")
|
||||
set(PROJECT_LICENSE "GPL-3.0-only")
|
||||
|
||||
set(PROJECT_FQDN "dev.lizardbyte.app.Sunshine")
|
||||
|
||||
set(PROJECT_BRIEF_DESCRIPTION "GameStream host for Moonlight") # must be <= 35 characters
|
||||
|
||||
set(PROJECT_LONG_DESCRIPTION "Offering low latency, cloud gaming server capabilities with support for AMD, Intel, \
|
||||
and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any \
|
||||
|
|
|
|||
|
|
@ -77,8 +77,14 @@ endif()
|
|||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
|
||||
|
||||
# application icon
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
|
||||
else()
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||
RENAME "${PROJECT_FQDN}.svg")
|
||||
endif()
|
||||
|
||||
# tray icon
|
||||
if(${SUNSHINE_TRAY} STREQUAL 1)
|
||||
|
|
@ -103,18 +109,32 @@ endif()
|
|||
|
||||
# desktop file
|
||||
# todo - validate desktop files with `desktop-file-validate`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
if(NOT ${SUNSHINE_BUILD_APPIMAGE})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
else()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
RENAME "${PROJECT_FQDN}.desktop")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
RENAME "${PROJECT_FQDN}_kms.desktop")
|
||||
endif()
|
||||
if(${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
RENAME "${PROJECT_FQDN}_terminal.desktop")
|
||||
elseif(NOT ${SUNSHINE_BUILD_APPIMAGE})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
endif()
|
||||
|
||||
# metadata file
|
||||
# todo - validate file with `appstream-util validate-relax`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
else()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_FQDN}.metainfo.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -6,4 +6,12 @@ elseif (UNIX)
|
|||
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
|
||||
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
|
||||
endif()
|
||||
|
||||
if(SUNSHINE_BUILD_FLATPAK)
|
||||
set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=${PROJECT_FQDN}")
|
||||
set(SUNSHINE_SERVICE_STOP_COMMAND "ExecStop=flatpak kill ${PROJECT_FQDN}")
|
||||
else()
|
||||
set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=${SUNSHINE_EXECUTABLE_PATH}")
|
||||
set(SUNSHINE_SERVICE_STOP_COMMAND "")
|
||||
endif()
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -10,12 +10,16 @@ if(APPLE)
|
|||
endif()
|
||||
elseif(UNIX)
|
||||
# configure the .desktop file
|
||||
set(SUNSHINE_DESKTOP_ICON "sunshine.svg")
|
||||
if(${SUNSHINE_BUILD_APPIMAGE})
|
||||
configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY)
|
||||
elseif(${SUNSHINE_BUILD_FLATPAK})
|
||||
set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}.svg")
|
||||
configure_file(packaging/linux/flatpak/sunshine.desktop sunshine.desktop @ONLY)
|
||||
configure_file(packaging/linux/flatpak/sunshine_kms.desktop sunshine_kms.desktop @ONLY)
|
||||
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
|
||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.metainfo.xml
|
||||
${PROJECT_FQDN}.metainfo.xml @ONLY)
|
||||
else()
|
||||
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
|
||||
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
|
||||
|
|
@ -35,7 +39,7 @@ elseif(UNIX)
|
|||
|
||||
# configure the flatpak manifest
|
||||
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
|
||||
configure_file(packaging/linux/flatpak/dev.lizardbyte.sunshine.yml dev.lizardbyte.sunshine.yml @ONLY)
|
||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY)
|
||||
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -148,25 +148,25 @@ Install
|
|||
Additional installation (required)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=additional-install.sh dev.lizardbyte.sunshine
|
||||
flatpak run --command=additional-install.sh dev.lizardbyte.app.Sunshine
|
||||
|
||||
Start:
|
||||
X11 and NVFBC capture (X11 Only)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run dev.lizardbyte.sunshine
|
||||
flatpak run dev.lizardbyte.app.Sunshine
|
||||
|
||||
KMS capture (Wayland & X11)
|
||||
.. code-block:: bash
|
||||
|
||||
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') \
|
||||
flatpak run dev.lizardbyte.sunshine
|
||||
flatpak run dev.lizardbyte.app.Sunshine
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine
|
||||
flatpak uninstall --delete-data dev.lizardbyte.sunshine
|
||||
flatpak run --command=remove-additional-install.sh dev.lizardbyte.app.Sunshine
|
||||
flatpak uninstall --delete-data dev.lizardbyte.app.Sunshine
|
||||
|
||||
.. tab:: Homebrew
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ Install
|
|||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
#Flatpak Only
|
||||
#ExecStop=flatpak kill dev.lizardbyte.sunshine
|
||||
#ExecStop=flatpak kill dev.lizardbyte.app.Sunshine
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
|
@ -268,7 +268,7 @@ Install
|
|||
deb /usr/bin/sunshine ✔
|
||||
rpm /usr/bin/sunshine ✔
|
||||
AppImage ~/sunshine.AppImage ✔
|
||||
Flatpak flatpak run dev.lizardbyte.sunshine ✔
|
||||
Flatpak flatpak run dev.lizardbyte.app.Sunshine ✔
|
||||
======== ============================================== ===============
|
||||
|
||||
**Start once**
|
||||
|
|
@ -504,7 +504,7 @@ To get a list of available arguments run the following:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=sunshine dev.lizardbyte.Sunshine --help
|
||||
flatpak run --command=sunshine dev.lizardbyte.app.Sunshine --help
|
||||
|
||||
Shortcuts
|
||||
---------
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ If you forgot your credentials to the web UI, try this.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=sunshine dev.lizardbyte.Sunshine --creds {new-username} {new-password}
|
||||
flatpak run --command=sunshine dev.lizardbyte.app.Sunshine --creds {new-username} {new-password}
|
||||
|
||||
|
||||
Web UI Access
|
||||
|
|
|
|||
11
packaging/linux/flatpak/apps.json
Normal file
11
packaging/linux/flatpak/apps.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"env": {
|
||||
"PATH": "$(PATH):$(HOME)/.local/bin"
|
||||
},
|
||||
"apps": [
|
||||
{
|
||||
"name": "Desktop",
|
||||
"image-path": "desktop.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>@PROJECT_FQDN@</id>
|
||||
|
||||
<name>@CMAKE_PROJECT_NAME@</name>
|
||||
<summary>@PROJECT_BRIEF_DESCRIPTION@</summary>
|
||||
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>@PROJECT_LICENSE@</project_license>
|
||||
|
||||
<supports>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>touch</control>
|
||||
<control>gamepad</control>
|
||||
</supports>
|
||||
|
||||
<url type="bugtracker">https://github.com/LizardByte/Sunshine/issues</url>
|
||||
<url type="homepage">@PROJECT_HOMEPAGE_URL@</url>
|
||||
<url type="donation">https://app.lizardbyte.dev/#Donate</url>
|
||||
<url type="contact">https://app.lizardbyte.dev/support</url>
|
||||
<url type="translate">https://translate.lizardbyte.dev</url>
|
||||
<url type="contribute">https://docs.lizardbyte.dev</url>
|
||||
<url type="vcs-browser">https://github.com/LizardByte/Sunshine</url>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
@PROJECT_LONG_DESCRIPTION@
|
||||
</p>
|
||||
|
||||
<p>NOTE: Allow Sunshine Virtual Input (Required)</p>
|
||||
<p>sudo chown $USER /dev/uinput && echo 'KERNEL=="uinput", SUBSYSTEM=="misc",
|
||||
OPTIONS+="static_node=uinput", TAG+="uaccess"' | sudo tee
|
||||
/etc/udev/rules.d/60-sunshine-input.rules</p>
|
||||
<p>NOTE: Sunshine uses a self-signed certificate. The web browser will report it as not secure,
|
||||
but it is safe.</p>
|
||||
<p>NOTE: KMS Grab (Optional)</p>
|
||||
<p>sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}')
|
||||
flatpak run @PROJECT_FQDN@</p>
|
||||
</description>
|
||||
|
||||
<releases>
|
||||
<release version="0.23.1" date="2024-04-21"/>
|
||||
<release version="0.23.0" date="2024-04-06"/>
|
||||
<release version="0.22.2" date="2024-03-15"/>
|
||||
<release version="0.22.1" date="2024-03-13"/>
|
||||
<release version="0.22.0" date="2024-03-04"/>
|
||||
<release version="0.21.0" date="2023-10-15"/>
|
||||
<release version="0.20.0" date="2023-05-29"/>
|
||||
<release version="0.19.1" date="2023-03-30"/>
|
||||
</releases>
|
||||
|
||||
<developer_name>LizardByte</developer_name>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://app.lizardbyte.dev/Sunshine/assets/images/AdobeStock_305732536_1920x1280.jpg</image>
|
||||
<caption>Sunshine</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<content_rating type="oars-1.0">
|
||||
<content_attribute id="language-profanity">moderate</content_attribute>
|
||||
<content_attribute id="language-humor">mild</content_attribute>
|
||||
<content_attribute id="money-purchasing">mild</content_attribute>
|
||||
</content_rating>
|
||||
<launchable type="desktop-id">@PROJECT_FQDN@.desktop</launchable>
|
||||
</component>
|
||||
298
packaging/linux/flatpak/dev.lizardbyte.app.Sunshine.yml
Normal file
298
packaging/linux/flatpak/dev.lizardbyte.app.Sunshine.yml
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
---
|
||||
app-id: "@PROJECT_FQDN@"
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: "22.08"
|
||||
sdk: org.freedesktop.Sdk
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.node18
|
||||
- org.freedesktop.Sdk.Extension.vala
|
||||
command: sunshine
|
||||
separate-locales: false
|
||||
finish-args:
|
||||
- --device=all # access all devices
|
||||
- --env=PULSE_PROP_media.category=Manager # allow sunshine to manage audio sinks
|
||||
- --env=SUNSHINE_MIGRATE_CONFIG=1 # migrate config files to the new location
|
||||
- --filesystem=home # need to save files in user's home directory
|
||||
- --share=ipc # required for X11 shared memory extension
|
||||
- --share=network # access network
|
||||
- --socket=pulseaudio # play sounds using pulseaudio
|
||||
- --socket=wayland # show windows using Wayland
|
||||
- --socket=fallback-x11 # show windows using X11
|
||||
- --system-talk-name=org.freedesktop.Avahi # talk to avahi on the system bus
|
||||
- --talk-name=org.freedesktop.Flatpak # talk to flatpak on the session bus
|
||||
|
||||
cleanup:
|
||||
- /include
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /lib/*.la
|
||||
- /lib/*.a
|
||||
- /share/man
|
||||
|
||||
build-options:
|
||||
append-path: /usr/lib/sdk/vala/bin
|
||||
prepend-ld-library-path: /usr/lib/sdk/vala/lib
|
||||
|
||||
modules:
|
||||
- "modules/xvfb/xvfb.json"
|
||||
|
||||
- name: avahi
|
||||
disabled: false
|
||||
cleanup:
|
||||
- /bin
|
||||
- /lib/avahi
|
||||
- /share
|
||||
config-opts:
|
||||
- --with-distro=none
|
||||
- --disable-gobject
|
||||
- --disable-introspection
|
||||
- --disable-qt3
|
||||
- --disable-qt4
|
||||
- --disable-qt5
|
||||
- --disable-gtk
|
||||
- --disable-core-docs
|
||||
- --disable-manpages
|
||||
- --disable-libdaemon
|
||||
- --disable-python
|
||||
- --disable-pygobject
|
||||
- --disable-mono
|
||||
- --disable-monodoc
|
||||
- --disable-autoipd
|
||||
- --disable-doxygen-doc
|
||||
- --disable-doxygen-dot
|
||||
- --disable-doxygen-xml
|
||||
- --disable-doxygen-html
|
||||
- --disable-manpages
|
||||
- --disable-xmltoman
|
||||
- --disable-libevent
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/a/avahi/avahi_0.8.orig.tar.gz
|
||||
sha256: 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/a/avahi/avahi_0.8-6ubuntu1.debian.tar.xz
|
||||
sha256: ebf1dfe5e853b6bc6843e3bd784cb6af632041f305abd0e5415114f80c1dcea4
|
||||
- type: shell
|
||||
commands:
|
||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
||||
- autoreconf -ivf
|
||||
|
||||
# yamllint disable-line rule:line-length
|
||||
# https://github.com/flathub/org.localsend.localsend_app/blob/7465669c22a2a4fc35e707e1e4e7e882772adc0e/org.localsend.localsend_app.yml#L27-L106
|
||||
# https://github.com/flathub/app.vup.Vup/blob/8c5073c7c5b8f24805013abc85a0860ca2439396/app.vup.Vup.yaml#L30-L78
|
||||
- name: libayatana-appindicator
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DENABLE_BINDINGS_MONO=NO
|
||||
- -DENABLE_BINDINGS_VALA=NO
|
||||
modules:
|
||||
- shared-modules/intltool/intltool-0.51.json
|
||||
- name: libdbusmenu-gtk3 # Dependency of libayatana-appindicator
|
||||
buildsystem: autotools
|
||||
build-options:
|
||||
cflags: -Wno-error
|
||||
env:
|
||||
HAVE_VALGRIND_FALSE: '#'
|
||||
HAVE_VALGRIND_TRUE: ''
|
||||
config-opts:
|
||||
- --with-gtk=3
|
||||
- --disable-dumper
|
||||
- --disable-static
|
||||
- --disable-tests
|
||||
- --disable-gtk-doc
|
||||
- --enable-introspection=no
|
||||
- --disable-vala
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://launchpad.net/libdbusmenu/16.04/16.04.0/+download/libdbusmenu-16.04.0.tar.gz
|
||||
sha256: b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a
|
||||
cleanup:
|
||||
- /include
|
||||
- /libexec
|
||||
- /lib/pkgconfig
|
||||
- /lib/*.la
|
||||
- /share/doc
|
||||
- /share/libdbusmenu
|
||||
- /share/gtk-doc
|
||||
- /share/gir-1.0
|
||||
- name: ayatana-ido
|
||||
buildsystem: cmake-ninja
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/AyatanaIndicators/ayatana-ido.git
|
||||
tag: 0.10.1
|
||||
commit: 13402a2cc4616b4b5f4244413599e635fcfc1401
|
||||
x-checker-data:
|
||||
type: anitya
|
||||
project-id: 18445
|
||||
tag-template: $version
|
||||
stable-only: true
|
||||
- name: libayatana-indicator
|
||||
buildsystem: cmake-ninja
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/AyatanaIndicators/libayatana-indicator.git
|
||||
tag: 0.9.3
|
||||
commit: a62e8ca13040554a8fc2536ce7e6aa888c5729d9
|
||||
x-checker-data:
|
||||
type: anitya
|
||||
project-id: 18447
|
||||
tag-template: $version
|
||||
stable-only: true
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/AyatanaIndicators/libayatana-appindicator.git
|
||||
tag: 0.5.92
|
||||
commit: d214fe3e7a6b1ba8faea68d70586310b34dc643c
|
||||
x-checker-data:
|
||||
type: anitya
|
||||
project-id: 18446
|
||||
tag-template: $version
|
||||
stable-only: true
|
||||
|
||||
- name: libevdev
|
||||
disabled: false
|
||||
buildsystem: meson
|
||||
config-opts:
|
||||
- -Ddocumentation=disabled
|
||||
- -Dtests=disabled
|
||||
cleanup:
|
||||
- /bin
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevdev/libevdev_1.13.0+dfsg.orig.tar.xz
|
||||
sha256: a882e13ef1dd6bd227318080cabf60fe5af3c06471259d3acfc9dbfb202351a7
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevdev/libevdev_1.13.0+dfsg-1.debian.tar.xz
|
||||
sha256: d33c56acbbfff2dc540e45c57a38d92210b5e7fd0947ac47fbe48183468aad74
|
||||
- type: shell
|
||||
commands:
|
||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
||||
|
||||
- name: libnotify
|
||||
buildsystem: meson
|
||||
config-opts:
|
||||
- -Dtests=false
|
||||
- -Dintrospection=disabled
|
||||
- -Dman=false
|
||||
- -Dgtk_doc=false
|
||||
- -Ddocbook_docs=disabled
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.2.tar.xz
|
||||
sha256: c5f4ed3d1f86e5b118c76415aacb861873ed3e6f0c6b3181b828cf584fc5c616
|
||||
x-checker-data:
|
||||
type: gnome
|
||||
name: libnotify
|
||||
stable-only: true
|
||||
- type: archive
|
||||
url: https://download.gnome.org/sources/gnome-common/3.18/gnome-common-3.18.0.tar.xz
|
||||
sha256: 22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf
|
||||
x-checker-data:
|
||||
type: gnome
|
||||
name: gnome-common
|
||||
stable-only: true
|
||||
|
||||
- name: miniupnpc
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DUPNPC_BUILD_SAMPLE=OFF
|
||||
- -DUPNPC_BUILD_SHARED=ON
|
||||
- -DUPNPC_BUILD_TESTS=OFF
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/m/miniupnpc/miniupnpc_2.2.5.orig.tar.gz
|
||||
sha256: 38acd5f4602f7cf8bcdc1ec30b2d58db2e9912e5d9f5350dd99b06bfdffb517c
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/m/miniupnpc/miniupnpc_2.2.5-1.debian.tar.xz
|
||||
sha256: f6ab181f3c999ae0630508ea1e6c76ae302262414061acaab12bf8763431ffd1
|
||||
- type: shell
|
||||
commands:
|
||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
||||
|
||||
- name: numactl
|
||||
buildsystem: autotools
|
||||
make-args:
|
||||
- install
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/n/numactl/numactl_2.0.14.orig.tar.gz
|
||||
sha256: 1ee27abd07ff6ba140aaf9bc6379b37825e54496e01d6f7343330cf1a4487035
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/n/numactl/numactl_2.0.14-3ubuntu2.debian.tar.xz
|
||||
sha256: 49089e5be5367f6367f8b0389d1d523944432607783b53f0605705792e1015ee
|
||||
- type: shell
|
||||
commands:
|
||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
||||
cleanup:
|
||||
- "/bin"
|
||||
|
||||
# Caching is configured until here, not including CUDA
|
||||
- name: cuda
|
||||
disabled: false
|
||||
buildsystem: simple
|
||||
only-arches:
|
||||
- x86_64
|
||||
- aarch64
|
||||
cleanup:
|
||||
- "*"
|
||||
build-commands:
|
||||
- chmod u+x ./cuda.run
|
||||
- ./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
--tmpdir=$FLATPAK_BUILDER_BUILDDIR
|
||||
- rm -r $FLATPAK_DEST/cuda/nsight-systems-*
|
||||
- rm ./cuda.run
|
||||
sources:
|
||||
- type: file
|
||||
only-arches:
|
||||
- x86_64
|
||||
url: https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run
|
||||
sha256: 905e9b9516900839fb76064719db752439f38b8cb730b49335d8bd53ddfad392
|
||||
dest-filename: cuda.run
|
||||
- type: file
|
||||
only-arches:
|
||||
- aarch64
|
||||
url: https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux_sbsa.run # yamllint disable-line rule:line-length
|
||||
sha256: cd13e9c65d4c8f895a968706f46064d536be09f9706bce081cc864b7e4fa4544
|
||||
dest-filename: cuda.run
|
||||
|
||||
- name: sunshine
|
||||
disabled: false
|
||||
buildsystem: cmake-ninja
|
||||
no-make-install: false
|
||||
builddir: true
|
||||
build-options:
|
||||
append-path: /usr/lib/sdk/node18/bin
|
||||
build-args:
|
||||
- --share=network
|
||||
test-args:
|
||||
- --share=network
|
||||
env:
|
||||
BUILD_VERSION: "@BUILD_VERSION@"
|
||||
BRANCH: "@GITHUB_BRANCH@"
|
||||
COMMIT: "@GITHUB_COMMIT@"
|
||||
npm_config_nodedir: /usr/lib/sdk/node18
|
||||
NPM_CONFIG_LOGLEVEL: info
|
||||
config-opts:
|
||||
- -DBUILD_DOCS=OFF
|
||||
- -DBUILD_WERROR=ON
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_CUDA_COMPILER=/app/cuda/bin/nvcc
|
||||
- -DSUNSHINE_ASSETS_DIR=share/sunshine
|
||||
- -DSUNSHINE_EXECUTABLE_PATH=/app/bin/sunshine
|
||||
- -DSUNSHINE_ENABLE_WAYLAND=ON
|
||||
- -DSUNSHINE_ENABLE_X11=ON
|
||||
- -DSUNSHINE_ENABLE_DRM=ON
|
||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||
- -DSUNSHINE_BUILD_FLATPAK=ON
|
||||
sources:
|
||||
- type: git
|
||||
url: "@GITHUB_CLONE_URL@"
|
||||
commit: "@GITHUB_COMMIT@"
|
||||
post-install:
|
||||
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/scripts/* /app/bin
|
||||
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/apps.json /app/share/sunshine/apps.json
|
||||
run-tests: true
|
||||
test-rule: "" # empty to disable
|
||||
test-commands:
|
||||
- xvfb-run tests/test_sunshine --gtest_color=yes
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"errors": [
|
||||
"finish-args-flatpak-spawn-access"
|
||||
],
|
||||
"info": [
|
||||
"finish-args-flatpak-spawn-access: finish-args has a talk-name access for org.freedesktop.Flatpak"
|
||||
],
|
||||
"message": "Please consult the documentation at https://docs.flathub.org/docs/for-app-authors/linter"
|
||||
}
|
||||
11
packaging/linux/flatpak/flatpak-lint-baseline_repo.json
Normal file
11
packaging/linux/flatpak/flatpak-lint-baseline_repo.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"errors": [
|
||||
"appstream-external-screenshot-url",
|
||||
"finish-args-flatpak-spawn-access"
|
||||
],
|
||||
"info": [
|
||||
"appstream-external-screenshot-url: Screenshots are not mirrored to https://dl.flathub.org/media",
|
||||
"finish-args-flatpak-spawn-access: finish-args has a talk-name access for org.freedesktop.Flatpak"
|
||||
],
|
||||
"message": "Please consult the documentation at https://docs.flathub.org/docs/for-app-authors/linter"
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=@PROJECT_NAME@
|
||||
Exec=flatpak run dev.lizardbyte.sunshine
|
||||
Exec=@PROJECT_FQDN@
|
||||
Version=1.0
|
||||
Comment=@PROJECT_DESCRIPTION@
|
||||
Icon=sunshine
|
||||
Icon=@SUNSHINE_DESKTOP_ICON@
|
||||
Keywords=gamestream;stream;moonlight;remote play;
|
||||
Categories=AudioVideo;Network;RemoteAccess;
|
||||
Actions=RunInTerminal;KMS;
|
||||
|
|
@ -12,9 +12,9 @@ Actions=RunInTerminal;KMS;
|
|||
[Desktop Action RunInTerminal]
|
||||
Name=Run in Terminal
|
||||
Icon=application-x-executable
|
||||
Exec=gio launch @CMAKE_INSTALL_FULL_DATAROOTDIR@/applications/sunshine_terminal.desktop
|
||||
Exec=gio launch @CMAKE_INSTALL_FULL_DATAROOTDIR@/applications/@PROJECT_FQDN@_terminal.desktop
|
||||
|
||||
[Desktop Action KMS]
|
||||
Name=Run in Terminal (KMS)
|
||||
Icon=application-x-executable
|
||||
Exec=gio launch @CMAKE_INSTALL_FULL_DATAROOTDIR@/applications/sunshine_kms.desktop
|
||||
Exec=gio launch @CMAKE_INSTALL_FULL_DATAROOTDIR@/applications/@PROJECT_FQDN@_kms.desktop
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=@PROJECT_NAME@ (KMS)
|
||||
Exec=sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.sunshine
|
||||
Exec=sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run @PROJECT_FQDN@
|
||||
Terminal=true
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<project_license>@PROJECT_LICENSE@</project_license>
|
||||
<name>@PROJECT_NAME@</name>
|
||||
<url type="homepage">@CMAKE_PROJECT_HOMEPAGE_URL@</url>
|
||||
<summary>@PROJECT_DESCRIPTION@</summary>
|
||||
<summary>@PROJECT_BRIEF_DESCRIPTION@</summary>
|
||||
<description>
|
||||
<p>
|
||||
@PROJECT_LONG_DESCRIPTION@
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Name=@PROJECT_NAME@
|
|||
Exec=/usr/bin/env systemctl start --u sunshine
|
||||
Version=1.0
|
||||
Comment=@PROJECT_DESCRIPTION@
|
||||
Icon=sunshine
|
||||
Icon=@SUNSHINE_DESKTOP_ICON@
|
||||
Keywords=gamestream;stream;moonlight;remote play;
|
||||
Categories=AudioVideo;Network;RemoteAccess;
|
||||
Actions=RunInTerminal;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ StartLimitIntervalSec=500
|
|||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
ExecStart=@SUNSHINE_EXECUTABLE_PATH@
|
||||
@SUNSHINE_SERVICE_START_COMMAND@
|
||||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue