build: Add dist script
This script will vendor the Rust dependencies of the app so that our tarballs can be built offline.
This commit is contained in:
parent
533158bb69
commit
2e237d41e8
2 changed files with 15 additions and 0 deletions
9
build-aux/meson/dist-vendor.sh
Normal file
9
build-aux/meson/dist-vendor.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
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"
|
||||||
|
|
@ -66,3 +66,9 @@ gnome.post_install(
|
||||||
glib_compile_schemas: true,
|
glib_compile_schemas: true,
|
||||||
update_desktop_database: true,
|
update_desktop_database: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
meson.add_dist_script(
|
||||||
|
'build-aux/meson/dist-vendor.sh',
|
||||||
|
join_paths(meson.project_build_root(), 'meson-dist', meson.project_name() + '-' + meson.project_version()),
|
||||||
|
meson.source_root()
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue