I went a different way and built my own runtime. I built the packages without the flatpak-builder. The package of ffDiaporama works with flatpak version 1.15 (Arch Linux) but is not stable yet.
Hera are my steps:
Building fh.frank.myBaseSdk on Ubuntu 20.04
mkdir -p myflatpakbuilddir-u20/ffdiaruntime/usr
cd myflatpakbuilddir-u20
flatpak build-init myBaseSdk fh.frank.myBaseSdk org.kde.Sdk/x86_64/5.12 org.kde.Sdk/x86_64/5.12
fakechroot fakeroot debootstrap --variant=minbase --arch=amd64 focal myBaseSdk/usr http://de.archive.ubuntu.com/ubuntu
fakeroot fakechroot chroot myBaseSdk/usr apt install nano
fakeroot fakechroot chroot myBaseSdk/usr apt install locales
nano myBaseSdk/usr/etc/locale.gen and I removed the appropriate comment marks
fakechroot chroot myBaseSdk/usr locale-gen
fakechroot chroot myBaseSdk/usr apt-get clean
I changed in myBaseSdk/metadata [Application] in [Runtime]
flatpak build-finish myBaseSdk
flatpak build-export -r …/ffdiarepo myBaseSdk
flatpak --user remote-add --no-gpg-verify …/ffdiarepo ffdiarepo
flatpak install ffdiarepo fh.frank.myBaseSdk
Runtime test:
flatpak run --command=/usr/bin/bash --filesystem=home fh.frank.myBaseSdk
exit
Building ffdiaruntime:
flatpak build-init -w ffdiaruntime fh.frank.ffdiaruntime fh.frank.myBaseSdk fh.frank.myBaseSdk
flatpak build ffdiaruntime ln -s /usr/usr/share /usr/share
flatpak build ffdiaruntime ln -s /usr/usr/include /usr/include
flatpak build ffdiaruntime ln -s /usr/usr/local /usr/local
flatpak build ffdiaruntime ln -s /usr/var/lib /var/lib
flatpak build ffdiaruntime ln -s /usr/usr/lib/apt /usr/lib/apt
flatpak build ffdiaruntime ln -s /usr/usr/lib/x86_64-linux-gnu/coreutils /usr/lib/x86_64-linux-gnu/coreutils
fakeroot fakechroot chroot ffdiaruntime/usr/
nano /etc/apt/sources.list
changed in deb http://de.archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
apt update
apt upgrade
apt install ffdiaporama
apt install libqt5concurrent5
ln -s /usr/usr/lib/locale /usr/lib/locale
ln -s /usr/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0
exit
Patching ffdiaporama_2.1+dfsg-1build2_amd64.deb because of ‘Unable to find codec h264’:
sudo apt-get source ffdiaporama
cd ffdiaporama-2.1+dfsg
sudo nano src/ffDiaporama/engine/_EncodeVideo.cpp:
t349c349,351
< *codec=avcodec_find_encoder_by_name(CodecName);
---
> if (strcmp(CodecName,"h264") == 0) *codec=avcodec_find_encoder_by_name("libx264");
> else *codec=avcodec_find_encoder_by_name(CodecName);
>
sudo apt-get -y build-dep ffdiaporama
sudo dpkg-source --commit
sudo debuild
cp ffdiaporama_2.1+dfsg-1build2_amd64.deb ffdiaruntime/usr/home/
fakeroot fakechroot chroot ffdiaruntime/usr/
apt remove ffdiaporama
dpkg -i /home/ffdiaporama_2.1+dfsg-1build2_amd64.deb
exit
Finishing runtime on Arch Linux with flatpak 1.15:
nano ffdiaruntime/metadata (changed [Application] in [Runtime])
flatpak build-finish ffdiaruntime
flatpak build-export -r …/ffdiarepo ffdiaruntime
flatpak install --user ffdiarepo fh.frank.ffdiaruntime
Dummy App:
flatpak build-init ffdiaapp fh.frank.u20.ffdiaporama fh.frank.ffdiaruntime fh.frank.ffdiaruntime
flatpak build-finish ffdiaapp –share=network --share=ipc --socket=x11 --socket=pulseaudio –filesystem=home --command=ffDiaporama
flatpak build-export …/ffdiarepo ffdiaapp
flatpak install --user ffdiarepo fh.frank.u20.ffdiaporama
This website (point 4) helped me: Flatpak - ArchWiki
And also Installation mit debootstrap › Wiki › ubuntuusers.de