From 9428156d10d4e1ccab26a4ecc131516ea9f376e9 Mon Sep 17 00:00:00 2001 From: ferreo Date: Wed, 27 Nov 2024 13:05:14 +0100 Subject: [PATCH] Update debian/rules --- debian/rules | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index 6339534..fcdee21 100755 --- a/debian/rules +++ b/debian/rules @@ -3,18 +3,27 @@ ## See debhelper(7) (uncomment to enable). ## Output every command that modifies files on the build system. export DH_VERBOSE = 1 -export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch) -export VENDORED ?= 1 -CLEAN ?= 1 +export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch) +export PATH := $(PATH):/root/.cargo/bin + +override_dh_prep: +# amd64 build prep +ifeq (amd64-v3,$(PIKA_BUILD_ARCH)) +export RUSTFLAGS = -C target-cpu=x86-64-v3 -C opt-level=3 +endif %: dh $@ override_dh_auto_build: - env CARGO_HOME="$$(pwd)/target/cargo" - cargo build --release - dh_auto_build + /root/.cargo/bin/cargo fetch + /root/.cargo/bin/cargo build --release override_dh_auto_install: - dh_auto_install -- prefix=/usr \ No newline at end of file + mkdir -p debian/tmp/usr/bin/ + cp -vf target/release/hyprwall debian/tmp/usr/bin/ + chmod 755 debian/tmp/usr/bin/hyprwall + +override_dh_install: + dh_install \ No newline at end of file