From 1710787490196b20bb903fdb7e4012664a8434a2 Mon Sep 17 00:00:00 2001 From: okseby Date: Wed, 30 Mar 2022 08:15:43 -0400 Subject: [PATCH] Bring Flatpak packaging up to date with Flathub repo --- flatpak/cider-wrapper | 7 +++ flatpak/flathub.json | 4 ++ flatpak/sh.cider.Cider.metainfo.xml | 38 +++++++++++++++ flatpak/sh.cider.Cider.yml | 75 +++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+) create mode 100644 flatpak/cider-wrapper create mode 100644 flatpak/flathub.json create mode 100644 flatpak/sh.cider.Cider.metainfo.xml create mode 100644 flatpak/sh.cider.Cider.yml diff --git a/flatpak/cider-wrapper b/flatpak/cider-wrapper new file mode 100644 index 00000000..d1d954f7 --- /dev/null +++ b/flatpak/cider-wrapper @@ -0,0 +1,7 @@ +#!/bin/sh + +for i in {0..9}; do + test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i; +done + +cider "$@" \ No newline at end of file diff --git a/flatpak/flathub.json b/flatpak/flathub.json new file mode 100644 index 00000000..8602c9bd --- /dev/null +++ b/flatpak/flathub.json @@ -0,0 +1,4 @@ +{ + "only-arches": ["x86_64"], + "publish-delay-hours": 2 +} \ No newline at end of file diff --git a/flatpak/sh.cider.Cider.metainfo.xml b/flatpak/sh.cider.Cider.metainfo.xml new file mode 100644 index 00000000..9a674783 --- /dev/null +++ b/flatpak/sh.cider.Cider.metainfo.xml @@ -0,0 +1,38 @@ + + + + sh.cider.Cider + + Cider + An open source and community oriented Apple Music client + + CC0-1.0 + AGPL-1.0-or-later + Cider Collective + + https://cider.sh/?utm_source=flathub%26utm_medium=link%26utm_campaign=product-page + https://github.com/ciderapp/Cider/issues + https://ko-fi.com/cryptofyre + + +

+ Project Cider. A new look into listening and enjoying Apple Music in style and performance with Features such as Discord and Last.fm integration, spatial audio support, equalizers, and remote controllable using companion app +

+
+ + cider.desktop + + + + https://github.com/ciderapp/cider.sh/blob/main/assets/img/frontpage-scn.png?raw=true + + + + + + + + + + +
diff --git a/flatpak/sh.cider.Cider.yml b/flatpak/sh.cider.Cider.yml new file mode 100644 index 00000000..252e2ea7 --- /dev/null +++ b/flatpak/sh.cider.Cider.yml @@ -0,0 +1,75 @@ +app-id: sh.cider.Cider +runtime: org.freedesktop.Platform +runtime-version: '21.08' +sdk: org.freedesktop.Sdk +base: org.electronjs.Electron2.BaseApp +base-version: '21.08' +command: cider-wrapper +rename-desktop-file: cider.desktop +rename-icon: cider +finish-args: + - --device=dri + - --filesystem=xdg-music + - --filesystem=xdg-run/app/com.discordapp.Discord:create + - --own-name=org.mpris.MediaPlayer2.cider + - --share=ipc + - --share=network + - --socket=pulseaudio + # needs electron v11 (chromium v87) or newer with ozone enabled + # https://github.com/electron/electron/issues/10915 + #- --socket=wayland + - --socket=x11 + - --system-talk-name=org.freedesktop.UPower + - --talk-name=com.canonical.AppMenu.Registrar + - --talk-name=com.canonical.dbusmenu + - --talk-name=org.freedesktop.Notifications + - --talk-name=org.kde.StatusNotifierWatcher +modules: + - name: cider + buildsystem: simple + build-commands: + - install -dm755 ${FLATPAK_DEST}/cider + - | + bsdtar -Oxf cider.deb 'data.tar*' | + bsdtar -xf - \ + -C ${FLATPAK_DEST}/cider \ + --strip-components=3 \ + ./opt/Cider + - | + bsdtar -Oxf cider.deb 'data.tar*' | + bsdtar -xf - \ + -C ${FLATPAK_DEST} \ + --strip-components=2 \ + --exclude=./usr/share/doc \ + ./usr/share + - install -Dm755 cider-wrapper /app/bin/cider-wrapper + - desktop-file-edit --set-key=Exec --set-value=cider-wrapper ${FLATPAK_DEST}/share/applications/cider.desktop + - install -Dm755 stub_sandbox ${FLATPAK_DEST}/cider/chrome-sandbox + - install -Dm755 cider -t ${FLATPAK_DEST}/bin/ + - install -Dm644 -t /app/share/metainfo ${FLATPAK_ID}.metainfo.xml + sources: + - type: file + dest-filename: cider.deb + url: https://github.com/ciderapp/cider-releases/releases/download/v1.3.0.1555/cider_1.3.0-alpha.1555_amd64.deb + sha256: 8a582ca2758d556cc2d5fad73e05ed3e2f27076e13bf377d1d83d9494aaef9c2 + x-checker-data: + type: json + url: https://api.github.com/repos/ciderapp/cider-releases/releases/latest + version-query: .tag_name + url-query: .assets[] | select(.name | match("(amd64.deb)")) | .browser_download_url + - type: script + dest-filename: cider + commands: + # share chromium singleton between multiple session, needed for flatpak<1.11.1 + - export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID + - exec zypak-wrapper /app/cider/cider "$@" + - type: script + dest-filename: stub_sandbox + commands: + - | + echo Stub sandbox ignoring command: $@ + exit 1 + - type: file + path: cider-wrapper + - type: file + path: sh.cider.Cider.metainfo.xml