Initial meson build.

This commit is contained in:
Jordan Petridis
2017-11-10 17:53:09 +02:00
parent b82e4c8932
commit bc6da31178
6 changed files with 259 additions and 26 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
cargo build --release && cp $1/target/release/hammond-gtk $2
+36
View File
@@ -0,0 +1,36 @@
#!/bin/sh
VERSION=$1
DEST=${MESON_BUILD_ROOT}
DIST=$DEST/dist/$VERSION
cd "${MESON_SOURCE_ROOT}"
mkdir -p $DIST
# copying files
cp -rf src $DIST
cp build.rs $DIST
cp Cargo.toml $DIST
cp configure $DIST
cp meson.build $DIST
cp LICENSE.txt $DIST
cp README.md $DIST
cp -rf res $DIST
cp -rf scripts $DIST
# cargo vendor
cargo vendor
mkdir $DIST/.cargo
cat <<EOF > $DIST/.cargo/config
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
cp -rf vendor $DIST/
# packaging
cd $DEST/dist
tar -czvf $VERSION.tar.gz $VERSION