From: Matthias Geiger <werdahias@debian.org>
Date: Sun, 7 Sep 2025 18:36:59 -0400
Subject: Set correct meson build paths

Forwarded: not-needed
Last-Update: 2025-02-10

Additionally, hardcode the git revision string to the upstream release commits' hash.
Last-Update: 2025-02-10
---
 meson.build       | 2 +-
 meson_options.txt | 5 +++++
 src/meson.build   | 6 +++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 35312d1..7ee424b 100644
--- a/meson.build
+++ b/meson.build
@@ -34,7 +34,7 @@ name       = 'Shortwave'
 base_id    = 'de.haeckerfelix.Shortwave'
 path_id    = '/de/haeckerfelix/Shortwave'
 app_id     = base_id
-vcs_tag    = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
+vcs_tag    = '9a7e520'
 profile    = get_option('profile')
 datadir    = join_paths(get_option('prefix'), get_option('datadir'))
 localedir  = join_paths(get_option('prefix'), get_option('localedir'))
diff --git a/meson_options.txt b/meson_options.txt
index 4c5cc39..2e2d89f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,8 @@ option (
   ],
   value: 'default'
 )
+option(
+  'host_arch',
+  type: 'string',
+  )
+
diff --git a/src/meson.build b/src/meson.build
index caf11a4..4995c4d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -25,7 +25,6 @@ run_command(
 
 # Setup cargo
 cargo = find_program('cargo')
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
 cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
 cargo_options += [ '--target-dir', meson.project_build_root() / 'target' ]
 
@@ -48,10 +47,11 @@ cargo_release = custom_target(
   install_dir: bindir,
   command: [
     'env',
-    cargo_env,
     cargo, 'build',
     cargo_options,
     '&&',
-    'cp', 'target' / rust_target / meson.project_name(), '@OUTPUT@',
+    'cp', meson.project_build_root() / 'target' / get_option('host_arch') / 'release' / meson.project_name(), '@OUTPUT@',
+   
+ 
   ]
 )
