wayshot/debian/rules
Ward from fusion-voyager-3 98063af728
Some checks failed
PikaOS Package Build Only (Canary) (amd64-v3) / build (push) Failing after 12s
test cargo build opts
2024-07-26 22:25:08 +03:00

36 lines
932 B
Makefile
Executable File

#! /usr/bin/make -f
## 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)
override_dh_prep:
# amd64 build prep
ifeq (amd64-v3,$(PIKA_BUILD_ARCH))
#export RUSTFLAGS = -C target-cpu=x86-64-v3 -C linker-plugin-lto -C opt-level=3
export RUSTFLAGS = -C linker-plugin-lto
endif
BUILDFLAGS := --release
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) \;
## This here will start the build:
%:
dh $@