Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -766,3 +766,61 @@ jobs:
token: ${{ secrets.WINGET_TOKEN }}
max-versions-to-keep: ${{ matrix.max_versions || '' }}
release-tag: ${{ matrix.build_type == 'nightly' && env.NIGHTLY_TAG || github.ref_name }}

# Flathub package submission
flathub-package-submit:
runs-on: ubuntu-latest
needs: [check-trigger, create_release, fetch-info]
if: needs.check-trigger.outputs.build_type == 'release'
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Checkout Flathub repository
uses: actions/checkout@v4.1.1
with:
repository: flathub/nl.jknaapen.fladder
token: ${{ secrets.FLATHUB_TOKEN }}
path: flathub-repo

- name: Update Flathub manifest
run: |
# Copy updated manifest files
cp flatpak/nl.jknaapen.fladder.flathub.yaml flathub-repo/nl.jknaapen.fladder.yaml
cp flatpak/nl.jknaapen.fladder.metainfo.xml flathub-repo/nl.jknaapen.fladder.metainfo.xml

cd flathub-repo

# Update the git tag in the manifest
sed -i "s|tag: v[0-9.]*|tag: ${{ github.ref_name }}|g" nl.jknaapen.fladder.yaml

# Get the commit hash for the release tag
cd ..
COMMIT_HASH=$(git rev-parse ${{ github.ref_name }}^{commit})
cd flathub-repo

# Update commit hash - look for the fladder sources section
sed -i "/name: fladder/,/sources:/s|tag: ${{ github.ref_name }}|tag: ${{ github.ref_name }}\\n commit: ${COMMIT_HASH}|" nl.jknaapen.fladder.yaml

# Update version in metainfo
TODAY=$(date +%Y-%m-%d)
VERSION_NUM="${{ needs.fetch-info.outputs.version_name }}"
sed -i "s|<release version=\"[0-9.]*\" date=\"[0-9-]*\">|<release version=\"${VERSION_NUM}\" date=\"${TODAY}\">|" nl.jknaapen.fladder.metainfo.xml

- name: Create Pull Request to Flathub
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.FLATHUB_TOKEN }}
path: flathub-repo
commit-message: Update to version ${{ github.ref_name }}
title: Update Fladder to ${{ github.ref_name }}
body: |
Automated update to version ${{ github.ref_name }}

**Release notes:** https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}

This PR was automatically created by the Fladder release workflow.
branch: update-${{ github.ref_name }}
delete-branch: true
206 changes: 206 additions & 0 deletions flatpak/nl.jknaapen.fladder.flathub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
id: nl.jknaapen.fladder
runtime: org.gnome.Platform
runtime-version: '48'
sdk: org.gnome.Sdk

command: Fladder
add-extensions:
org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
version: '24.08'
add-ld-path: .

cleanup-commands:
- mkdir -p /app/lib/ffmpeg

finish-args:
# X11/Wayland access
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
# Audio playback
- --socket=pulseaudio
# Network access for Jellyfin streaming
- --share=network
# File access for downloads/media
- --filesystem=home
# File access for downloads temporary directory
- --filesystem=/tmp
# Allow access to PipeWire socket for mpv
- --filesystem=xdg-run/pipewire-0:ro
# Hardware acceleration
- --device=dri
# Allow notification access
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.PowerManagement
- --talk-name=org.freedesktop.ScreenSaver
- --talk-name=org.freedesktop.portal.*
# DBus system bus access for NetworkManager (connectivity checking)
- --system-talk-name=org.freedesktop.NetworkManager

modules:
- name: mpv
buildsystem: meson
config-opts:
- -Dlibmpv=true
- -Dcplayer=false
- -Dbuild-date=false
- -Dmanpage-build=disabled
- -Dvaapi=enabled
- -Dcuda-hwaccel=enabled
- -Dpulse=enabled
- -Dalsa=enabled
- -Duchardet=enabled
cleanup:
- /lib/pkgconfig
- /share
- /include
sources:
- type: git
url: https://github.com/mpv-player/mpv.git
tag: v0.39.0
commit: a0fba7be57f3822d967b04f0f6b6d6341e7516e7
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
modules:
- name: ffnvcodec
buildsystem: simple
build-commands:
- make install PREFIX=/app
cleanup:
- /lib/pkgconfig
- /include
sources:
- type: git
url: https://github.com/FFmpeg/nv-codec-headers.git
tag: n13.0.19.0
commit: e844e5b26f46bb77479f063029595293aa8f812d
x-checker-data:
type: git
tag-pattern: ^n([\d.]+)$
- shared-modules/luajit/luajit.json
- name: libass
config-opts:
- --enable-shared
- --disable-static
cleanup:
- /lib/*.la
- /lib/pkgconfig
- /include
sources:
- type: git
url: https://github.com/libass/libass.git
tag: 0.17.3
commit: e46aedea0a0d17da4c4ef49d84b94a7994664ab5
x-checker-data:
type: git
tag-pattern: ^([\d.]+)$
- name: uchardet
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_LIBDIR=lib
- -DBUILD_BINARY=OFF
cleanup:
- /lib/*.a
- /lib/pkgconfig
- /share
- /include
sources:
- type: archive
url: https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.8.tar.xz
sha256: e97a60cfc00a1c147a674b097bb1422abd9fa78a2d9ce3f3fdcc2e78a34ac5f0
x-checker-data:
type: html
url: https://www.freedesktop.org/software/uchardet/releases/
version-pattern: uchardet-(\d+\.\d+\.\d+)\.tar\.xz
url-template: https://www.freedesktop.org/software/uchardet/releases/uchardet-$version.tar.xz
- name: libplacebo
buildsystem: meson
config-opts:
- -Dvulkan=enabled
- -Dshaderc=enabled
- --libdir=lib
sources:
- type: git
url: https://code.videolan.org/videolan/libplacebo.git
tag: v7.349.0
commit: 1fd3c7bde7b943fe8985c893310b5269a09b46c5
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$

- name: zenity
buildsystem: meson
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/zenity.git
tag: 4.0.3
commit: 7f7ac1840cfd914dfac69d947f0849dc50b0f695

# Flutter SDK
- name: flutter-sdk
buildsystem: simple
build-commands:
- mkdir -p /app/flutter
- cp -r * /app/flutter/
- /app/flutter/bin/flutter config --no-analytics
- /app/flutter/bin/flutter precache --linux
cleanup:
- '*'
sources:
- type: archive
only-arches:
- x86_64
url: https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.35.1-stable.tar.xz
sha256: 58efd9d1e570a1bf976e218cfbbcca3f23b21b873d765a74e045d5b9022ab515
x-checker-data:
type: json
url: https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json
version-query: .releases[] | select(.channel == "stable") | .version
url-query: .releases[] | select(.channel == "stable" and .version == $version) | "https://storage.googleapis.com/flutter_infra_release/releases/" + .archive
is-main-source: true

- name: fladder
buildsystem: simple
build-commands:
# Set up Flutter
- export PATH="/app/flutter/bin:$PATH"
- export PUB_CACHE=/run/build/fladder/pub_cache

# Get dependencies and build
- flutter pub get
- flutter build linux --release

# Install the app
- mkdir -p /app/bin
- cp -r build/linux/x64/release/bundle/* /app/bin/
- chmod +x /app/bin/fladder

# Fix RPATH for libraries
- |
for lib in /app/bin/lib/*.so; do
if [[ -f "$lib" && -n "$(patchelf --print-rpath "$lib" 2>/dev/null || true)" ]]; then
patchelf --set-rpath '$ORIGIN' "$lib" || true
fi
done
- patchelf --set-rpath '$ORIGIN/lib' /app/bin/fladder

# Install desktop file and icon
- mkdir -p /app/share/applications
- mkdir -p /app/share/icons/hicolor/scalable/apps
- install -Dm644 flatpak/Fladder.desktop /app/share/applications/${FLATPAK_ID}.desktop
- install -Dm644 icons/fladder_icon.svg /app/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg

# Install metainfo
- mkdir -p /app/share/metainfo
- install -Dm644 flatpak/${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
sources:
- type: git
url: https://github.com/DonutWare/Fladder.git
tag: v0.8.0
# Note: This will be updated automatically by the GitHub workflow
# x-checker-data:
# type: git
# tag-pattern: ^v([\d.]+)$
72 changes: 72 additions & 0 deletions flatpak/nl.jknaapen.fladder.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>nl.jknaapen.fladder</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MPL-2.0</project_license>
<name>Fladder</name>
<summary>A simple cross-platform Jellyfin client</summary>

<description>
<p>
Fladder is a modern, cross-platform Jellyfin client that provides a seamless
media streaming experience. Built with Flutter, it offers a beautiful and
intuitive interface for accessing your Jellyfin media library.
</p>
<p>Features:</p>
<ul>
<li>Stream movies, TV shows, and music from your Jellyfin server</li>
<li>Beautiful and responsive user interface</li>
<li>Hardware-accelerated video playback</li>
<li>Support for multiple profiles</li>
<li>Offline media downloads</li>
<li>Cross-platform compatibility</li>
</ul>
</description>

<launchable type="desktop-id">nl.jknaapen.fladder.desktop</launchable>

<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/DonutWare/Fladder/develop/assets/marketing/screenshot1.png</image>
<caption>Main interface</caption>
</screenshot>
</screenshots>

<url type="homepage">https://github.com/DonutWare/Fladder</url>
<url type="bugtracker">https://github.com/DonutWare/Fladder/issues</url>
<url type="vcs-browser">https://github.com/DonutWare/Fladder</url>

<developer id="nl.jknaapen">
<name>DonutWare</name>
</developer>

<content_rating type="oars-1.1">
<content_attribute id="social-info">mild</content_attribute>
</content_rating>

<releases>
<release version="0.0.0" date="1970-01-01">
<description>
<p>Latest release - see GitHub for detailed changelog</p>
</description>
</release>
</releases>

<requires>
<internet>always</internet>
</requires>

<categories>
<category>AudioVideo</category>
<category>Player</category>
</categories>

<keywords>
<keyword>jellyfin</keyword>
<keyword>media</keyword>
<keyword>streaming</keyword>
<keyword>video</keyword>
<keyword>audio</keyword>
<keyword>music</keyword>
</keywords>
</component>