From 177ef1cdcc709b6f500249cc64148bca57b0841a Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 27 Oct 2024 14:31:11 -0400 Subject: [PATCH] build: A flatpak experiment. I still don't get it. --- .gitignore | 1 + GNUmakefile | 4 ++++ src/com.unprompted.tildefriends.yml | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 src/com.unprompted.tildefriends.yml diff --git a/.gitignore b/.gitignore index 5c9f1aa8..714701de 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ db.* deps/ios_toolchain/ deps/openssl/ dist/ +.flatpak-builder .keys logs/ **/node_modules diff --git a/GNUmakefile b/GNUmakefile index 5b80d607..c803f2f5 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1105,6 +1105,10 @@ out/tildefriends-x86_64.AppImage: out/release/tildefriends out/data.zip appimage: out/tildefriends-x86_64.AppImage .PHONY: appimage +flatpak: out/ + flatpak-builder --force-clean --user --install-deps-from=flathub --install --repo=out/flatpak-repo out/flatpak src/com.unprompted.tildefriends.yml +.PHONY: flatpak + clean: rm -rf $(BUILD_DIR) .PHONY: clean diff --git a/src/com.unprompted.tildefriends.yml b/src/com.unprompted.tildefriends.yml new file mode 100644 index 00000000..b9600bdf --- /dev/null +++ b/src/com.unprompted.tildefriends.yml @@ -0,0 +1,25 @@ +id: com.unprompted.tildefriends +runtime: org.freedesktop.Platform +runtime-version: '23.08' +sdk: org.freedesktop.Sdk +command: tildefriends-run.sh +finish-args: + - --share=network +modules: + - name: tildefriends + buildsystem: simple + build-commands: + - make release out/data.zip + - install -Dm755 out/release/tildefriends /app/bin/tildefriends + - install -D out/data.zip /app/share/data.zip + - install -Dm755 tildefriends-run.sh /app/bin/tildefriends-run.sh + sources: + - type: git + url: https://dev.tildefriends.net/cory/tildefriends.git + dest: . + commit: main + - type: script + dest-filename: tildefriends-run.sh + commands: + - mkdir ~/.local/share/applications/tildefriends/ + - exec tildefriends run -z /app/share/data.zip -d ~/.local/share/applications/tildefriends/db.sqlite