blob: 56dc49d06cabd5ef31825edf8695ee9dd359fb2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
include /usr/share/rustc/architecture.mk
export DH_VERBOSE=1
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE=bcachefs-tools_$(DEB_VERSION_UPSTREAM)
NUMJOBS = 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
PREFIX := /usr
ROOT_SBINDIR := /usr/sbin
export PREFIX ROOT_SBINDIR
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq ($(DEB_BUILD_ARCH),amd64)
DEB_BUILD_MAINT_OPTIONS += optimize=-lto
endif
export CARGO_ARGS = "--frozen"
%:
dh $@ --parallel --with dkms
override_dh_clean:
# HACK: breaks cargo checksumming by deleting some vendored files.
cargo_config:
rm -rf .cargo
mkdir -p .cargo
cp debian/cargo.config .cargo/config.toml
override_dh_auto_build:
$(MAKE) -f debian/rules cargo_config
dh_auto_build
override_dh_auto_clean:
$(MAKE) -f debian/rules cargo_config
dh_auto_clean
rm -rf .cargo
override_dh_usrlocal:
# FIXME: fails with
# dh_usrlocal: error: debian/bcachefs-tools/usr/local/libexec/bcachefsck_all is not a directory
override_dh_auto_test:
|