linux: add a Flatpak manifest

This manifest will build a Flatpak from the current local source
directory.
This commit is contained in:
Owen D'Aprile 2022-09-25 15:19:18 -04:00
parent 9d7931c8c2
commit 129b6ea416
No known key found for this signature in database
GPG Key ID: 291B46C15C77F8C3
2 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,31 @@
# Flatpak Build Instructions
## Prerequisites
To build the Flatpak, install the `flatpak` and `flatpak-builder` packages
from your repositories. Then, [add Flathub](https://flatpak.org/setup/).
Now, install the KDE SDK:
```sh
flatpak install flathub org.kde.Sdk//5.15-22.08
```
## Building and installing
To build and install the app locally:
```sh
flatpak-builder --force-clean --install --user builddir build-aux/flatpak/org.thentrythis.Samplebrain.yaml
```
## Building and exporting
To build and export a Flatpak bundle:
```sh
flatpak-builder --force-clean --repo=repo builddir build-aux/flatpak/org.thentrythis.Samplebrain.yaml
flatpak build-bundle repo org.thentrythis.Samplebrain.flatpak org.thentrythis.Samplebrain
```
To install the bundle:
```sh
flatpak install org.thentrythis.Samplebrain.flatpak
```

View File

@ -0,0 +1,73 @@
id: org.thentrythis.Samplebrain
runtime: org.kde.Platform
runtime-version: "5.15-22.08"
sdk: org.kde.Sdk
rename-desktop-file: samplebrain.desktop
rename-icon: samplebrain
command: samplebrain
finish-args:
- "--share=ipc"
- "--socket=wayland"
- "--socket=fallback-x11"
- "--socket=pulseaudio"
- "--device=dri"
- "--share=network"
cleanup:
- "/include"
- "/lib/cmake"
- "/lib/pkgconfig"
- "/share/doc"
modules:
- name: libsndfile
buildsystem: cmake-ninja
config-opts:
- "-DCMAKE_BUILD_TYPE=Release"
- "-DBUILD_SHARED_LIBS=ON"
- "-DENABLE_EXTERNAL_LIBS=NO"
- "-DENABLE_CPACK=NO"
- "-DBUILD_PROGRAMS=OFF"
- "-DBUILD_EXAMPLES=OFF"
sources:
- type: archive
url: https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-1.1.0.tar.xz
sha256: 0f98e101c0f7c850a71225fb5feaf33b106227b3d331333ddc9bacee190bcf41
- name: portaudio
buildsystem: autotools
config-opts:
- "--with-alsa"
- "--without-jack"
- "--without-oss"
- "--without-asihpi"
sources:
- type: archive
url: http://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz
sha256: 47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
- name: liblo
buildsystem: autotools
config-opts:
- "--disable-tests"
- "--disable-network-tests"
- "--disable-tools"
- "--disable-examples"
sources:
- type: archive
url: https://versaweb.dl.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz
sha256: 2b4f446e1220dcd624ecd8405248b08b7601e9a0d87a0b94730c2907dbccc750
- name: samplebrain
buildsystem: qmake
build-options:
env:
PREFIX: /app
config-opts:
- "LIBS+=-L/app/lib"
sources:
- type: dir
path: ../../