niri/debian/rules
ferreo 1860eea880
Some checks failed
PikaOS Package Build & Release (amd64-v3) / build (push) Failing after 2m33s
Initial packaging
2024-12-10 13:25:25 +00:00

37 lines
1.4 KiB
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)
export PATH := $(PATH):/root/.cargo/bin
override_dh_prep:
# amd64 build prep
ifeq (amd64-v3,$(PIKA_BUILD_ARCH))
# 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
endif
%:
dh $@
override_dh_auto_install:
mkdir -p debian/niri/usr/bin/
mkdir -p debian/niri/usr/share/wayland-sessions/
mkdir -p debian/niri/usr/share/xdg-desktop-portal/
mkdir -p debian/niri/usr/lib/systemd/user/
/root/.cargo/bin/cargo fetch
/root/.cargo/bin/cargo build --release
cp -vf target/release/niri debian/niri/usr/bin/niri
chmod +x debian/niri/usr/bin/niri
chmod 755 debian/niri/usr/bin/niri
cp -vf resources/niri-session debian/niri/usr/bin/niri-session
cp -vf resources/niri.desktop debian/niri/usr/share/wayland-sessions/niri.desktop
cp -vf resources/niri-portals.conf debian/niri/usr/share/xdg-desktop-portal/niri-portals.conf
cp -vf resources/niri.service (systemd) debian/niri/usr/lib/systemd/user/niri.service
cp -vf resources/niri-shutdown.target (systemd) debian/niri/usr/lib/systemd/user/niri-shutdown.target
chmod +x debian/niri/usr/bin/niri-session
chmod 755 debian/niri/usr/bin/niri-session