2023-07-06 18:59:29 +02:00
|
|
|
#! /usr/bin/make -f
|
|
|
|
|
|
|
|
## See debhelper(7) (uncomment to enable).
|
|
|
|
## Output every command that modifies files on the build system.
|
|
|
|
export DH_VERBOSE = 1
|
|
|
|
|
2024-07-26 21:13:26 +02:00
|
|
|
export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch)
|
2023-07-06 18:59:29 +02:00
|
|
|
|
2024-07-26 20:53:19 +02:00
|
|
|
override_dh_prep:
|
|
|
|
# amd64 build prep
|
|
|
|
ifeq (amd64-v3,$(PIKA_BUILD_ARCH))
|
2024-07-26 21:32:27 +02:00
|
|
|
# Does not support LTO due to dylib-lto
|
|
|
|
#export RUSTFLAGS = -C target-cpu=x86-64-v3 -C lto=fat -C embed-bitcode -C codegen-units=1 -C opt-level=3 -Zdylib-lto
|
|
|
|
export RUSTFLAGS = -C target-cpu=x86-64-v3 -C opt-level=3
|
2024-07-26 20:53:19 +02:00
|
|
|
endif
|
2023-07-06 18:59:29 +02:00
|
|
|
|
2024-07-26 21:12:03 +02:00
|
|
|
BUILDFLAGS := --release
|
2024-07-26 21:05:20 +02:00
|
|
|
BINARY := wayshot
|
|
|
|
TARGET_DIR := $(DESTDIR)/usr/bin
|
|
|
|
SOURCE_DIR := ./target/release
|
|
|
|
MAN1_DIR := /usr/share/man/man1
|
|
|
|
MAN7_DIR := /usr/share/man/man7
|
|
|
|
|
|
|
|
override_dh_auto_build:
|
|
|
|
cargo build $(BUILDFLAGS)
|
|
|
|
|
|
|
|
override_dh_auto_install:
|
|
|
|
mkdir -p $(TARGET_DIR)
|
|
|
|
cp $(SOURCE_DIR)/$(BINARY) $(TARGET_DIR)
|
|
|
|
chmod +x $(TARGET_DIR)/$(BINARY)
|
|
|
|
find ./docs -type f -iname "*.1.gz" -exec cp {} $(MAN1_DIR) \;
|
|
|
|
find ./docs -type f -iname "*.7.gz" -exec cp {} $(MAN7_DIR) \;
|
|
|
|
|
2023-07-06 18:59:29 +02:00
|
|
|
## This here will start the build:
|
|
|
|
%:
|
|
|
|
dh $@
|