diff --git a/build-aux/dist-vendor.sh b/build-aux/dist-vendor.sh new file mode 100644 index 0000000..7dfa7df --- /dev/null +++ b/build-aux/dist-vendor.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export DIST="$1" +export SOURCE_ROOT="$2" + +cd "$SOURCE_ROOT" +mkdir "$DIST"/.cargo +cargo vendor > $DIST/.cargo/config +# Move vendor into dist tarball directory +mv vendor "$DIST" diff --git a/meson.build b/meson.build index 9d5731d..348266b 100644 --- a/meson.build +++ b/meson.build @@ -21,6 +21,12 @@ bindir = prefix / get_option('bindir') datadir = prefix / get_option('datadir') iconsdir = datadir / 'icons' +meson.add_dist_script( + 'build-aux/dist-vendor.sh', + meson.build_root() / 'meson-dist' / meson.project_name() + '-' + meson.project_version(), + meson.source_root() +) + cargo_sources = files( 'Cargo.toml', 'Cargo.lock',