Add support for building with meson and add flatpak template
This commit is contained in:
55
build-aux/com.lemmy-gtk.lemoa.json
Normal file
55
build-aux/com.lemmy-gtk.lemoa.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"id": "com.lemmy-gtk.lemoa",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "42",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"sdk-extensions": [
|
||||
"org.freedesktop.Sdk.Extension.rust-stable",
|
||||
"org.freedesktop.Sdk.Extension.llvm14"
|
||||
],
|
||||
"command": "lemoa",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--device=dri",
|
||||
"--env=RUST_LOG=gtk_rust_template=debug",
|
||||
"--env=G_MESSAGES_DEBUG=none",
|
||||
"--env=RUST_BACKTRACE=1"
|
||||
],
|
||||
"build-options": {
|
||||
"append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm14/bin",
|
||||
"build-args": [
|
||||
"--share=network"
|
||||
],
|
||||
"env": {
|
||||
"CARGO_REGISTRIES_CRATES_IO_PROTOCOL": "sparse",
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang",
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER": "clang",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold"
|
||||
},
|
||||
"test-args": [
|
||||
"--socket=x11",
|
||||
"--share=network"
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "lemoa",
|
||||
"buildsystem": "meson",
|
||||
"run-tests": true,
|
||||
"config-opts": [
|
||||
"-Dprofile=development"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
11
build-aux/dist-vendor.sh
Normal file
11
build-aux/dist-vendor.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
export DIST="$1"
|
||||
export SOURCE_ROOT="$2"
|
||||
|
||||
cd "$SOURCE_ROOT"
|
||||
mkdir "$DIST"/.cargo
|
||||
cargo vendor | sed 's/^directory = ".*"/directory = "vendor"/g' > $DIST/.cargo/config
|
||||
# Move vendor into dist tarball directory
|
||||
mv vendor "$DIST"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user