diff --git a/.gitignore b/.gitignore index cb117fd6..fe21aa37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +*flatpak* +build Cargo.lock +repo target \ No newline at end of file diff --git a/README.md b/README.md index af14ffc5..72badf12 100644 --- a/README.md +++ b/README.md @@ -198,9 +198,22 @@ cargo install Yoda ``` bash git clone https://github.com/YGGverse/Yoda.git cd Yoda -cargo build +cargo build --release ``` -* `cargo run` +* run `target/release/Yoda` + +#### Flatpak + +``` bash +git clone https://github.com/YGGverse/Yoda.git +cd Yoda +flatpak-builder --force-clean build\ + --install-deps-from=flathub\ + --install --repo=repo --user\ + io.github.yggverse.Yoda.yaml +``` +* launch: `flatpak run io.github.yggverse.Yoda` +* bundle: `flatpak build-bundle repo Yoda.flatpak io.github.yggverse.Yoda` ## Development diff --git a/data/io.github.yggverse.Yoda.desktop b/data/io.github.yggverse.Yoda.desktop new file mode 100644 index 00000000..b083f234 --- /dev/null +++ b/data/io.github.yggverse.Yoda.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Categories=GNOME;GTK;Network +Comment=Browser for Gemini protocol +Exec=Yoda +GenericName=Browser +#Icon=io.github.yggverse.Yoda +Keywords=Gnome;GTK;Gemini;Browser +Name=Yoda +StartupNotify=true +Terminal=false +Type=Application +X-GNOME-UsesNotifications=true +X-Purism-FormFactor=Workstation diff --git a/io.github.yggverse.Yoda.yaml b/io.github.yggverse.Yoda.yaml new file mode 100644 index 00000000..63837ff3 --- /dev/null +++ b/io.github.yggverse.Yoda.yaml @@ -0,0 +1,49 @@ +id: "io.github.yggverse.Yoda" +runtime: "org.gnome.Platform" +runtime-version: "48" +sdk: "org.gnome.Sdk" + +sdk-extensions: + - "org.freedesktop.Sdk.Extension.rust-stable" + +command: "Yoda" + +finish-args: + - "--device=dri" + - "--share=ipc" + - "--share=network" + - "--socket=fallback-x11" +# - "--socket=pulseaudio" + - "--socket=wayland" + +build-options: + append-path: "/usr/lib/sdk/rust-stable/bin" + build-args: + - "--share=network" + env: + CARGO_HOME: "/run/build/Yoda/cargo" + +modules: + - name: "libspelling" + buildsystem: "meson" + config-opts: + - "--prefix=/app" + cleanup: + - "/include" + - "/lib/pkgconfig" + sources: + - type: "archive" + url: "https://gitlab.gnome.org/GNOME/libspelling/-/archive/0.4.9/libspelling-0.4.9.tar.gz" + sha256: "7fa6185d9fc621b890ef01b2bb7943951dc2ad94d31cbf6e16bc468589571e17" + + - name: "Yoda" + buildsystem: "simple" + build-commands: + - "cargo build --release" + post-install: + - "install -Dm755 ./target/release/Yoda -t /app/bin" + - "install -Dm644 ./data/${FLATPAK_ID}.desktop -t /app/share/applications" +# - "install -Dm644 ./data/${FLATPAK_ID}.svg -t /app/share/icons/hicolor/symbolic/apps" + sources: + - type: "dir" + path: "." \ No newline at end of file