| 1 |
|
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow |
| 4 |
include /usr/share/dpkg/buildopts.mk |
| 5 |
|
| 6 |
%: |
| 7 |
dh $@ |
| 8 |
|
| 9 |
export systemdsystemunitdir:=$(shell pkg-config systemd --variable=systemdsystemunitdir) |
| 10 |
export modulesdir=/usr/lib/modules-load.d |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
export CARGO_HOME=$(CURDIR)/target/cargo-home |
| 17 |
export CARGO_NET_OFFLINE=true |
| 18 |
|
| 19 |
override_dh_auto_configure: |
| 20 |
dh_auto_configure -- --enable-doc \ |
| 21 |
--libexecdir='$$(libdir)' \ |
| 22 |
--with-systemdsystemunitdir=$(systemdsystemunitdir) |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
execute_before_dh_auto_build: |
| 30 |
mkdir -p $(CARGO_HOME) |
| 31 |
cp debian/cargo-config.toml $(CARGO_HOME)/config.toml |
| 32 |
cp Cargo.lock target/Cargo.lock.orig |
| 33 |
sed -i '/^checksum = /d' Cargo.lock |
| 34 |
execute_after_dh_auto_build: |
| 35 |
mv target/Cargo.lock.orig Cargo.lock |
| 36 |
|
| 37 |
override_dh_auto_install: |
| 38 |
dh_auto_install -- modulesdir=$(modulesdir) dbusconfdir=/usr/share/dbus-1/system.d |
| 39 |
|
| 40 |
override_dh_auto_test: |
| 41 |
|
| 42 |
execute_before_dh_clean: |
| 43 |
test ! -f target/Cargo.lock.orig || mv target/Cargo.lock.orig Cargo.lock |
| 44 |
|
| 45 |
execute_after_dh_install: |
| 46 |
@echo 'Strip wrong #include "config.h" from ddcci.h (bug#518083)' |
| 47 |
sed --in-place 's:[#]include "config.h"::' \ |
| 48 |
debian/libddccontrol-dev/usr/include/ddccontrol/ddcci.h |