build(linux): consolidate appstream metainfo (#3954)

This commit is contained in:
ReenigneArcher 2025-06-09 12:39:57 -04:00 committed by GitHub
commit c9a06fd8a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 118 additions and 100 deletions

View file

@ -1,13 +1,13 @@
[Desktop Entry]
Type=Application
Name=@PROJECT_NAME@
Exec=sunshine
Version=1.0
Categories=RemoteAccess;Network;
Comment=@PROJECT_DESCRIPTION@
Exec=sunshine
Icon=sunshine
Keywords=gamestream;stream;moonlight;remote play;
Categories=AudioVideo;Network;RemoteAccess;
Name=@PROJECT_NAME@
Terminal=true
Type=Application
Version=1.0
X-AppImage-Arch=x86_64
X-AppImage-Name=sunshine
X-AppImage-Version=@PROJECT_VERSION@
X-AppImage-Arch=x86_64

View file

@ -36,7 +36,10 @@ depends=(
)
makedepends=(
'appstream'
'appstream-glib'
'cmake'
'desktop-file-utils'
'cuda'
"gcc${_gcc_version}"
'git'
@ -86,6 +89,11 @@ build() {
-D SUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' \
-D SUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
appstreamcli validate "build/dev.lizardbyte.app.Sunshine.metainfo.xml"
appstream-util validate "build/dev.lizardbyte.app.Sunshine.metainfo.xml"
desktop-file-validate "build/dev.lizardbyte.app.Sunshine.desktop"
desktop-file-validate "build/dev.lizardbyte.app.Sunshine.terminal.desktop"
make -C build
}

View file

@ -1,15 +1,15 @@
[Desktop Entry]
Type=Application
Name=@PROJECT_NAME@
Exec=/usr/bin/env systemctl start --u sunshine
Version=1.0
Actions=RunInTerminal;
Categories=RemoteAccess;Network;
Comment=@PROJECT_DESCRIPTION@
Exec=/usr/bin/env systemctl start --u sunshine
Icon=@SUNSHINE_DESKTOP_ICON@
Keywords=gamestream;stream;moonlight;remote play;
Categories=AudioVideo;Network;RemoteAccess;
Actions=RunInTerminal;
Name=@PROJECT_NAME@
Type=Application
Version=1.0
[Desktop Action RunInTerminal]
Name=Run in Terminal
Exec=gio launch @CMAKE_INSTALL_FULL_DATAROOTDIR@/applications/@PROJECT_FQDN@.terminal.desktop
Icon=application-x-executable
Exec=gio launch @CMAKE_INSTALL_FULL_DATAROOTDIR@/applications/sunshine_terminal.desktop
Name=Run in Terminal

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<component type="desktop">
<id>@PROJECT_FQDN@</id>
<name>@CMAKE_PROJECT_NAME@</name>
<name>@PROJECT_NAME@</name>
<summary>@PROJECT_BRIEF_DESCRIPTION@</summary>
<metadata_license>CC0-1.0</metadata_license>
@ -15,39 +15,49 @@
<control>gamepad</control>
</supports>
<url type="bugtracker">https://github.com/LizardByte/Sunshine/issues</url>
<url type="homepage">@PROJECT_HOMEPAGE_URL@</url>
<url type="bugtracker">https://github.com/LizardByte/Sunshine/issues</url>
<url type="faq">https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2troubleshooting.html</url>
<url type="help">https://docs.lizardbyte.dev/projects/sunshine</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>
<url type="contact">https://app.lizardbyte.dev/support</url>
<description>
<p>
@PROJECT_LONG_DESCRIPTION@
</p>
<p>NOTE: Sunshine requires additional installation steps.</p>
<p>NOTE: Sunshine requires additional installation steps (Flatpak).</p>
<p>
<code>flatpak run --command=additional-install.sh @PROJECT_FQDN@</code>
</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>NOTE: KMS Grab (Flatpak)</p>
<p>
<code>sudo -i PULSE_SERVER=unix:/run/user/$(id -u $whoami)/pulse/native flatpak run @PROJECT_FQDN@</code>
</p>
</description>
<releases>
<release version="@PROJECT_VERSION@" date="1990-01-01"></release>
<release version="@PROJECT_VERSION@" date="@PROJECT_YEAR@-@PROJECT_MONTH@-@PROJECT_DAY@">
<description>
<p>
See the full changelog on GitHub
<!-- changelog -->
</p>
</description>
</release>
</releases>
<developer_name>LizardByte</developer_name>
<developer id="dev.lizardbyte">
<name>LizardByte</name>
</developer>
<screenshots>
<screenshot type="default">
<image>https://app.lizardbyte.dev/Sunshine/assets/img/banners/AdobeStock_305732536_1920x1280.jpg</image>
<caption>Sunshine</caption>
<image>https://app.lizardbyte.dev/Sunshine/assets/img/screenshots/01-sunshine-welcome-page.png</image>
<caption>Sunshine welcome page</caption>
</screenshot>
</screenshots>
<content_rating type="oars-1.0">

View file

@ -15,8 +15,11 @@ License: GPLv3-only
URL: https://github.com/LizardByte/Sunshine
Source0: tarball.tar.gz
BuildRequires: appstream
# BuildRequires: boost-devel >= 1.86.0
BuildRequires: cmake >= 3.25.0
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: libayatana-appindicator3-devel
BuildRequires: libcap-devel
BuildRequires: libcurl-devel
@ -197,6 +200,11 @@ cmake "${cmake_args[@]}"
make -j$(nproc) -C "%{_builddir}/Sunshine/build"
%check
# validate the metainfo file
appstreamcli validate %{buildroot}%{_metainfodir}/*.metainfo.xml
appstream-util validate %{buildroot}%{_metainfodir}/*.metainfo.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
# run tests
cd %{_builddir}/Sunshine/build
xvfb-run ./tests/test_sunshine
@ -252,14 +260,14 @@ rm -f /usr/lib/modules-load.d/uhid.conf
%{_modulesloaddir}/uhid.conf
# Desktop entries
%{_datadir}/applications/sunshine*.desktop
%{_datadir}/applications/*.desktop
# Icons
%{_datadir}/icons/hicolor/scalable/apps/sunshine.svg
%{_datadir}/icons/hicolor/scalable/status/sunshine*.svg
# Metainfo
%{_datadir}/metainfo/sunshine.appdata.xml
%{_datadir}/metainfo/*.metainfo.xml
# Assets
%{_datadir}/sunshine/**

View file

@ -1,5 +1,5 @@
[Desktop Entry]
Categories=AudioVideo;Network;RemoteAccess;
Categories=RemoteAccess;Network;
Comment=@PROJECT_DESCRIPTION@
Exec=sunshine.sh
Icon=@SUNSHINE_DESKTOP_ICON@

View file

@ -1,6 +1,6 @@
{
"dev.lizardbyte.app.Sunshine": [
"appstream-missing-screenshots",
"appstream-external-screenshot-url",
"appstream-screenshots-not-mirrored-in-ostree",
"external-gitmodule-url-found",
"finish-args-flatpak-spawn-access"

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>@PROJECT_NAME@</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>@PROJECT_LICENSE@</project_license>
<name>@PROJECT_NAME@</name>
<url type="homepage">@CMAKE_PROJECT_HOMEPAGE_URL@</url>
<summary>@PROJECT_BRIEF_DESCRIPTION@</summary>
<description>
<p>
@PROJECT_LONG_DESCRIPTION@
</p>
</description>
<launchable type="desktop-id">sunshine.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://app.lizardbyte.dev/Sunshine/assets/images/AdobeStock_305732536_1920x1280.jpg</image>
<caption>Sunshine</caption>
</screenshot>
</screenshots>
</component>