mirror of
https://github.com/Felitendo/spotifast.git
synced 2026-11-01 17:33:26 +01:00
Align native and Flatpak window IDs with installed desktop entries and icons, while preserving existing window state. Keep packaging compatible with the immutable 0.8.0 inputs and test both launcher generations. Refs #462
67 lines
3.0 KiB
YAML
67 lines
3.0 KiB
YAML
# Spotifast as a Flatpak, built from source: the manifest Flathub builds
|
|
# from. The copy in the Flathub repository names a tag and its commit in
|
|
# the source below and carries cargo-sources.json next to it; flathub.sh
|
|
# writes both. For a local build, this one takes the checkout as it is:
|
|
#
|
|
# flatpak-builder --user --install --force-clean build-dir \
|
|
# packaging/flatpak/rocks.spotifast.Spotifast.yml
|
|
#
|
|
# The release workflow does not build from source twice: it packages the
|
|
# binary the Linux job already built, through the bundle manifest beside
|
|
# this one, whose finish-args are the same as these.
|
|
id: rocks.spotifast.Spotifast
|
|
runtime: org.freedesktop.Platform
|
|
runtime-version: '24.08'
|
|
sdk: org.freedesktop.Sdk
|
|
sdk-extensions:
|
|
- org.freedesktop.Sdk.Extension.rust-stable
|
|
command: spotifast
|
|
finish-args:
|
|
# Wayland first, X11 when that is what there is.
|
|
- --socket=wayland
|
|
- --socket=fallback-x11
|
|
- --share=ipc
|
|
- --device=dri
|
|
# Sound: PulseAudio, which PipeWire also answers.
|
|
- --socket=pulseaudio
|
|
# Spotify's API, the streaming session, the sign-in's local redirect, and
|
|
# mDNS for receivers on the network.
|
|
- --share=network
|
|
# The tray item, media keys and Now Playing over MPRIS, and the name the
|
|
# single instance is found by.
|
|
# Platform storage for this application's Spotify grants.
|
|
- --talk-name=org.freedesktop.secrets
|
|
- --talk-name=org.kde.StatusNotifierWatcher
|
|
- --own-name=org.mpris.MediaPlayer2.fastpotify
|
|
- --own-name=rocks.fastpotify.Instance
|
|
# Older Flatpak versions leave XDG_STATE_HOME unset. Keep the fallback
|
|
# state directory (session, history, logs, and credential markers) durable.
|
|
- --persist=.local/state
|
|
build-options:
|
|
append-path: /usr/lib/sdk/rust-stable/bin
|
|
env:
|
|
CARGO_HOME: /run/build/fastpotify/cargo
|
|
modules:
|
|
- name: fastpotify
|
|
buildsystem: simple
|
|
build-commands:
|
|
- cargo --offline fetch --manifest-path Cargo.toml --verbose
|
|
- cargo --offline build --release --locked
|
|
- install -Dm755 target/release/fastpotify /app/bin/fastpotify
|
|
- ln -s fastpotify /app/bin/spotifast
|
|
- install -Dm644 packaging/applications/*.desktop /app/share/applications/rocks.spotifast.Spotifast.desktop
|
|
- sed -i 's/^Icon=.*$/Icon=rocks.spotifast.Spotifast/;s/^StartupWMClass=spotifast$/StartupWMClass=rocks.spotifast.Spotifast/' /app/share/applications/rocks.spotifast.Spotifast.desktop
|
|
- install -Dm644 packaging/icons/*.svg /app/share/icons/hicolor/scalable/apps/rocks.spotifast.Spotifast.svg
|
|
- install -Dm644 packaging/flatpak/rocks.spotifast.Spotifast.metainfo.xml /app/share/metainfo/rocks.spotifast.Spotifast.metainfo.xml
|
|
- install -Dm644 LICENSE /app/share/licenses/fastpotify/LICENSE
|
|
sources:
|
|
- type: dir
|
|
path: ../..
|
|
# Supply the current app ID even when generating a manifest for an older tag.
|
|
- type: file
|
|
path: rocks.spotifast.Spotifast.metainfo.xml
|
|
dest: packaging/flatpak
|
|
# Every crate the lockfile names, for the offline build; flathub.sh
|
|
# writes it with flatpak-cargo-generator.
|
|
- cargo-sources.json
|