mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-08-03 23:11:28 +02:00
Compile rust inside flatpak build context
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
cd "$(dirname 0)"
|
||||
CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-../../target}"
|
||||
|
||||
# TODO: cross compilation with cross --target=aarch64-unknown-linux-gnu
|
||||
cargo b -r
|
||||
|
||||
cp "$CARGO_TARGET_DIR/release/inkopslista" inköpslista
|
||||
|
||||
# TODO: cross compilation with --arch=aarch64
|
||||
flatpak-builder -v --force-clean --user --install-deps-from=flathub --repo=repo --install builddir sh.nubo.Inkopslista.yml
|
||||
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Inköpslista
|
||||
Exec=inköpslista %U
|
||||
Exec=inkopslista %U
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=sh.nubo.Inkopslista
|
||||
|
||||
@@ -2,43 +2,34 @@ id: sh.nubo.Inkopslista
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '25.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.rust-stable
|
||||
|
||||
command: 'inköpslista'
|
||||
build-options:
|
||||
append-path: /usr/lib/sdk/rust-stable/bin
|
||||
build-args:
|
||||
- --share=network
|
||||
|
||||
command: 'inkopslista'
|
||||
|
||||
modules:
|
||||
- name: inköpslista
|
||||
buildsystem: simple
|
||||
sources:
|
||||
# - type: script
|
||||
# dest-filename: gui
|
||||
# commands:
|
||||
# - echo "hello there"
|
||||
- type: file
|
||||
path: ./sh.nubo.Inkopslista.desktop
|
||||
- type: file
|
||||
path: ./inköpslista
|
||||
- type: file
|
||||
path: ../images/icon.svg
|
||||
- type: file
|
||||
path: ../images/icon_x512.png
|
||||
- type: file
|
||||
path: ../images/icon_x192.png
|
||||
- type: file
|
||||
path: ../images/icon_x144.png
|
||||
- type: file
|
||||
path: ../images/icon_x128.png
|
||||
- type: file
|
||||
path: ../images/icon_x72.png
|
||||
- type: dir
|
||||
path: ../..
|
||||
build-commands:
|
||||
- install -Dm755 inköpslista $FLATPAK_DEST/bin/inköpslista
|
||||
- install -Dm644 sh.nubo.Inkopslista.desktop $FLATPAK_DEST/share/applications/sh.nubo.Inkopslista.desktop
|
||||
- cargo build --release --locked
|
||||
- install -Dm755 target/release/inkopslista $FLATPAK_DEST/bin/inkopslista
|
||||
|
||||
- install -Dm644 icon.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/sh.nubo.Inkopslista.svg
|
||||
- install -Dm644 icon_x512.png $FLATPAK_DEST/share/icons/hicolor/512x512/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x192.png $FLATPAK_DEST/share/icons/hicolor/192x192/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x144.png $FLATPAK_DEST/share/icons/hicolor/144x144/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x128.png $FLATPAK_DEST/share/icons/hicolor/128x128/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x72.png $FLATPAK_DEST/share/icons/hicolor/72x72/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/flatpak/sh.nubo.Inkopslista.desktop $FLATPAK_DEST/share/applications/sh.nubo.Inkopslista.desktop
|
||||
|
||||
- install -Dm644 gui/images/icon.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/sh.nubo.Inkopslista.svg
|
||||
- install -Dm644 gui/images/icon_x512.png $FLATPAK_DEST/share/icons/hicolor/512x512/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x192.png $FLATPAK_DEST/share/icons/hicolor/192x192/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x144.png $FLATPAK_DEST/share/icons/hicolor/144x144/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x128.png $FLATPAK_DEST/share/icons/hicolor/128x128/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x72.png $FLATPAK_DEST/share/icons/hicolor/72x72/apps/sh.nubo.Inkopslista.png
|
||||
|
||||
finish-args:
|
||||
# Wayland access
|
||||
|
||||
Reference in New Issue
Block a user