Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
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 # Build the Rust crates offline against the librust-*-dev build
13 # dependencies (unpacked under /usr/share/cargo/registry) rather than
14 # fetching them from crates.io. Keep the cargo state under target/ so
15 # the source tree stays pristine.
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 # Debian repackages some crates without an upstream checksum, so the
25 # crates.io checksums pinned in Cargo.lock do not match the local
26 # registry. Drop the checksums (cargo repopulates them from the local
27 # registry) for the build, then restore the upstream Cargo.lock so the
28 # source tree is left unchanged.
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