Skip to content

Instantly share code, notes, and snippets.

@user5145
Last active January 26, 2024 21:42
Show Gist options
  • Save user5145/9aecebaa8045174958123c9798c93009 to your computer and use it in GitHub Desktop.
Save user5145/9aecebaa8045174958123c9798c93009 to your computer and use it in GitHub Desktop.
how to build, install and remove flatpak applications from cli
1. Store in a repository
flatpak-builder --force-clean build-dir --repo=/path/to/local/repo your.application.Client.yml
2. Install from the repository
flatpak --user install localrepo your.application.Client
3. Install the repository
flatpak --user remote-add --no-gpg-verify local-repo /path/to/repo
4. Store in a folder
flatpak-builder --user --force-clean --install ../build-dir your.application.Client.yml
5. Debugging
flatpak run --command=bash --devel com.ankama.Dofus
6. Remove
flatpak remove your.application.Client
7. Add your repo
export MY_FLATPAK_REPO=/mnt/storage/.flatpak_repo
flatpak-builder --user --repo="${MY_FLATPAK_REPO}" --force-clean ../build-dir your.application.Client.yml
flatpak --user remote-add --no-gpg-verify my_repo "${MY_FLATPAK_REPO}"
8. Add common repositories
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists --user kdeapps https://distribute.kde.org/kdeapps.flatpakrepo
flatpak remote-add --if-not-exists --user gnome https://sdk.gnome.org/gnome.flatpakrepo
flatpak remote-add --if-not-exists --user flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak remote-add --if-not-exists --user freedesktop-dev https://cache.sdk.freedesktop.org/freedesktop-sdk.flatpakrepo
- name: xml
sources:
- type: git
url: https://github.com/GNOME/libxml2.git
tag: v2.9.10
- name: texinfo
sources:
- type: git
url: https://git.savannah.gnu.org/git/texinfo.git
tag: texinfo-6.7
- name: libpng12
sources:
- type: archive
url: https://sourceforge.net/projects/libpng/files/libpng12/1.2.59/libpng-1.2.59.tar.xz
sha256: b4635f15b8adccc8ad0934eea485ef59cc4cae24d0f0300a9a941e51974ffcc7
- name: krb5
subdir: src
config-opts:
- --prefix=/usr
- --enable-shared
- --with-ldap
- --with-lmdb
sources:
- type: archive
url: https://web.mit.edu/kerberos/dist/krb5/1.17/krb5-1.17.tar.gz
sha256: 5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5
- name: gphoto2
sources:
- type: archive
url: https://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.23/libgphoto2-2.5.23.tar.bz2
sha256: d8af23364aa40fd8607f7e073df74e7ace05582f4ba13f1724d12d3c97e8852d
- name: opencl-headers
buildsystem: simple
build-commands:
- cp -R CL /usr/include/CL
sources:
- type: git
url: https://github.com/KhronosGroup/OpenCL-Headers.git
commit: 0d5f18c6e7196863bc1557a693f1509adfcee056
- name: FAudio
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DFFMPEG=ON
sources:
- type: archive
url: "https://github.com/FNA-XNA/FAudio/archive/19.09.tar.gz"
sha256: 754b5ccc239bc1be4046d254748cface915e653aec179424fd452255a7082677
- name: lmdb
subdir: libraries/liblmdb
make-install-args:
- prefix=/usr
sources:
- type: archive
url: https://github.com/LMDB/lmdb/archive/LMDB_0.9.24.tar.gz
sha256: 44602436c52c29d4f301f55f6fd8115f945469b868348e3cddaf91ab2473ea26
- name: pcap
sources:
- type: archive
url: https://www.tcpdump.org/release/libpcap-1.9.0.tar.gz
sha256: 2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019
- name: v4l-utils
config-opts:
- --disable-static
- --disable-doxygen-doc
- --disable-v4l-utils
sources:
- type: archive
url: https://linuxtv.org/downloads/v4l-utils/v4l-utils-1.16.7.tar.bz2
sha256: ee917a7e1af72c60c0532d9fdb9e48baf641d427aa7b009a9b2ca821f9e8e0d9
- name: capi
sources:
- type: archive
url: "http://deb.debian.org/debian/pool/main/libc/libcapi20-3/libcapi20-3_3.27.orig.tar.bz2"
sha256: d8e423d5adba1750f511a2c088296db2a8a2e1e9209401871b01ce411d8ac583
- name: sane
config-opts:
- --enable-libusb_1_0
- --enable-pthread
- --enable-avahi
- --disable-locking
- --disable-rpath
sources:
- type: archive
url: https://gitlab.com/sane-project/backends/uploads/9e718daff347826f4cfe21126c8d5091/sane-backends-1.0.28.tar.gz
sha256: 31260f3f72d82ac1661c62c5a4468410b89fb2b4a811dabbfcc0350c1346de03
- name: openldap
config-opts:
- --disable-static
- --disable-bdb
- --disable-hdb
- --enable-mdb
sources:
- type: archive
url: https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.46.tgz
sha256: 9a90dcb86b99ae790ccab93b7585a31fbcbeec8c94bf0f7ab0ca0a87ea0c4b2d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment