From: Pieter Lenaerts <plenae@disroot.org>
Date: Sat, 25 Jul 2026 21:13:47 +0200
Subject: Use DEB_HOST_RUST_TYPE in meson.options.txt and src/meson.build

Forwarded: not-needed
---
 meson_options.txt |  5 +++++
 src/meson.build   | 12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/meson_options.txt b/meson_options.txt
index 5a71ffd..96c6970 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,3 +8,8 @@ option(
   value: 'development',
   description: 'The build profile for Resources. One of "default" or "development".'
 )
+
+option(
+  'host_arch',
+  type: 'string',
+)
diff --git a/src/meson.build b/src/meson.build
index 36abe97..7337e16 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -30,6 +30,8 @@ endif
 # cargo_env = ['CARGO_HOME=' + meson.project_build_root() / 'cargo']
 cargo_env = []
 
+host_arch = get_option('host_arch')
+
 test(
   'Cargo tests (main application)',
   cargo,
@@ -64,7 +66,7 @@ copy_binary = custom_target(
   output: meson.project_name(),
   command: [
     'cp',
-    'src' / rust_target / meson.project_name(),
+    'src' / host_arch / rust_target / meson.project_name(),
     '@OUTPUT@',
   ],
 )
@@ -79,7 +81,7 @@ copy_kill_binary = custom_target(
   output: meson.project_name() + '-kill',
   command: [
     'cp',
-    'src' / rust_target / meson.project_name() + '-kill',
+    'src' / host_arch / rust_target / meson.project_name() + '-kill',
     '@OUTPUT@',
   ],
 )
@@ -94,7 +96,7 @@ copy_processes_binary = custom_target(
   output: meson.project_name() + '-processes',
   command: [
     'cp',
-    'src' / rust_target / meson.project_name() + '-processes',
+    'src' / host_arch / rust_target / meson.project_name() + '-processes',
     '@OUTPUT@',
   ],
 )
@@ -109,7 +111,7 @@ copy_adjust_binary = custom_target(
   output: meson.project_name() + '-adjust',
   command: [
     'cp',
-    'src' / rust_target / meson.project_name() + '-adjust',
+    'src' / host_arch / rust_target / meson.project_name() + '-adjust',
     '@OUTPUT@',
   ],
-)
\ No newline at end of file
+)
