clone

a desktop tv and program guide for over-the-air broadcasts: what's on air, what your tuner gets, live tv, recordings

main
airwaves / build / linux / flatpak / dev.airwaves.Airwaves.yml
dev.airwaves.Airwaves.yml 2.8K
1# Airwaves desktop app as a Flatpak. Built by scripts/flatpak.sh. By hand,2# from the repo root (the source), with the build dirs outside it:3# flatpak-builder --user --install-deps-from=flathub --force-clean \4# --state-dir=/tmp/aw/state --repo=/tmp/aw/repo /tmp/aw/build \5# build/linux/flatpak/dev.airwaves.Airwaves.yml6# The GNOME runtime ships GTK 3 and webkit2gtk-4.1, which Wails v2 links7# against (hence the webkit2_41 tag). Video goes hls.js -> WebKitGTK MSE ->8# GStreamer, so H.264/AAC decoding needs the runtime's codecs-extra9# extension (org.freedesktop.Platform.codecs-extra//26.08-extra); on Intel10# GPUs flatpak also pulls org.freedesktop.Platform.VAAPI.Intel, which11# GStreamer's vah264dec uses for hardware decode.12app-id: dev.airwaves.Airwaves13runtime: org.gnome.Platform14runtime-version: '51'15sdk: org.gnome.Sdk16sdk-extensions:17 - org.freedesktop.Sdk.Extension.golang18command: airwaves19finish-args:20 - --share=network21 - --share=ipc22 - --socket=wayland23 - --socket=fallback-x1124 - --socket=pulseaudio25 - --device=dri26 # Game controllers: WebKitGTK's Gamepad API reads /dev/input through27 # libmanette (Flatpak 1.15.6 or later).28 - --device=input29modules:30 - name: airwaves31 buildsystem: simple32 build-options:33 append-path: /usr/lib/sdk/golang/bin34 # Modules (and a newer Go toolchain, if go.mod wants one) come from35 # the network at build time.36 build-args:37 - --share=network38 # -ldflags "-s -w" already strips it.39 no-debuginfo: true40 env:41 GOTOOLCHAIN: auto42 GOPATH: /run/build/airwaves/.gopath43 GOCACHE: /run/build/airwaves/.gocache44 GOFLAGS: -modcacherw45 CGO_ENABLED: '1'46 build-commands:47 - go version48 - go build -tags desktop,production,webkit2_41 -trimpath -ldflags "-s -w" -o airwaves .49 - install -Dm755 airwaves /app/bin/airwaves50 - install -Dm644 build/linux/flatpak/dev.airwaves.Airwaves.desktop /app/share/applications/dev.airwaves.Airwaves.desktop51 - install -Dm644 build/linux/flatpak/dev.airwaves.Airwaves.metainfo.xml /app/share/metainfo/dev.airwaves.Airwaves.metainfo.xml52 # build/appicon.png is 1024px; hicolor tops out at 512. (GStreamer,53 # not gdk-pixbuf: its glycin loaders need a portal the build lacks.)54 - >-55 for s in 128 256 512; do56 gst-launch-1.0 -q filesrc location=build/appicon.png ! pngdec ! videoscale method=lanczos57 ! video/x-raw,width=$s,height=$s ! pngenc ! filesink location=icon-$s.png &&58 install -Dm644 icon-$s.png /app/share/icons/hicolor/${s}x${s}/apps/dev.airwaves.Airwaves.png || exit 1;59 done60 - chmod -R u+w /run/build/airwaves/.gopath61 sources:62 # The repo root: scripts/flatpak.sh unpacks the committed HEAD there.63 - type: dir64 path: ../../..