File: rules

package info (click to toggle)
bcachefs-tools 1%3A1.13.0-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,088 kB
  • sloc: ansic: 119,034; python: 433; makefile: 268; sh: 221
file content (41 lines) | stat: -rwxr-xr-x 993 bytes parent folder | download
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/rustc/architecture.mk

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)

PREFIX := /usr
ROOT_SBINDIR := /usr/sbin

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

ifeq ($(DEB_BUILD_ARCH),amd64)
    DEB_BUILD_MAINT_OPTIONS += optimize=-lto
endif

%:
	dh $@

override_dh_auto_configure:
	$(CARGO) prepare-debian $(CURDIR)/vendor --link-from-system

override_dh_auto_build:
	$(RM) Cargo.lock
	dh_auto_build -- CARGO="$(CARGO)"

override_dh_auto_install:
	dh_auto_install -- "PREFIX=$(PREFIX)" "ROOT_SBINDIR=$(ROOT_SBINDIR)"

override_dh_auto_clean:
	! [ -d $(CURDIR)/vendor ] || $(RM) -r $(CURDIR)/vendor
	! [ -d $(CARGO_HOME) ] || $(RM) -r $(CARGO_HOME)
	$(RM) Cargo.lock
	dh_auto_clean

override_dh_auto_test: