Now building with meson.
This commit is contained in:
parent
bc6da31178
commit
1199c9aa81
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@ Cargo.lock
|
|||||||
.vscode
|
.vscode
|
||||||
*.ui~
|
*.ui~
|
||||||
*.gresource
|
*.gresource
|
||||||
|
_build
|
||||||
|
vendor/
|
||||||
|
|||||||
16
Makefile
16
Makefile
@ -1,16 +0,0 @@
|
|||||||
# Generated by configure; do not edit
|
|
||||||
|
|
||||||
all:
|
|
||||||
/usr/bin/ninja -C /home/alatiera/projects/rust/hammond/_build
|
|
||||||
|
|
||||||
install:
|
|
||||||
DESTDIR="$(DESTDIR)" /usr/bin/ninja -C /home/alatiera/projects/rust/hammond/_build install
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
/usr/bin/ninja -C /home/alatiera/projects/rust/hammond/_build uninstall
|
|
||||||
|
|
||||||
release:
|
|
||||||
/usr/bin/ninja -C /home/alatiera/projects/rust/hammond/_build release
|
|
||||||
|
|
||||||
check:
|
|
||||||
/usr/bin/mesontest -C /home/alatiera/projects/rust/hammond/_build
|
|
||||||
3
configure
vendored
3
configure
vendored
@ -141,9 +141,6 @@ install:
|
|||||||
uninstall:
|
uninstall:
|
||||||
${NINJA} ${NINJA_OPT} uninstall
|
${NINJA} ${NINJA_OPT} uninstall
|
||||||
|
|
||||||
release:
|
|
||||||
${NINJA} ${NINJA_OPT} release
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
${MESONTEST} ${NINJA_OPT}
|
${MESONTEST} ${NINJA_OPT}
|
||||||
END
|
END
|
||||||
|
|||||||
11
meson.build
11
meson.build
@ -11,22 +11,19 @@ hammond_minor_version = version_array[1].to_int()
|
|||||||
hammond_version_micro = version_array[2].to_int()
|
hammond_version_micro = version_array[2].to_int()
|
||||||
|
|
||||||
hammond_prefix = get_option('prefix')
|
hammond_prefix = get_option('prefix')
|
||||||
hammond_datadir = join_paths(hammond_prefix, get_option('datadir'), 'hammond')
|
|
||||||
hammond_bindir = join_paths(hammond_prefix, get_option('bindir'))
|
hammond_bindir = join_paths(hammond_prefix, get_option('bindir'))
|
||||||
|
|
||||||
install_data('assets/org.gnome.Hammond.desktop', install_dir : get_option('datadir') + '/applications')
|
install_data('assets/org.gnome.Hammond.desktop', install_dir : get_option('datadir') + '/applications')
|
||||||
|
|
||||||
cargo = find_program('cargo', required: false)
|
cargo = find_program('cargo', required: false)
|
||||||
|
gresource = find_program('glib-compile-resources', required: false)
|
||||||
|
cargo_vendor = find_program('cargo-vendor', required: false)
|
||||||
cargo_script = find_program('scripts/cargo.sh')
|
cargo_script = find_program('scripts/cargo.sh')
|
||||||
|
|
||||||
cargo_release = custom_target('cargo-build',
|
cargo_release = custom_target('cargo-build',
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
build_always: true,
|
|
||||||
output: ['hammond'],
|
output: ['hammond'],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: hammond_bindir,
|
install_dir: hammond_bindir,
|
||||||
command: ['HAMMOND_RES=' + hammond_datadir, cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
|
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
|
||||||
|
|
||||||
cargo = find_program('cargo-vendor', required: false)
|
|
||||||
run_target('release', command: ['scripts/release.sh',
|
|
||||||
meson.project_name() + '-' + hammond_version
|
|
||||||
])
|
|
||||||
|
|||||||
@ -1,36 +0,0 @@
|
|||||||
#!/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
|
|
||||||
Loading…
Reference in New Issue
Block a user