File: rules

package info (click to toggle)
reform-setup-wizard 1.0-14.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 556 kB
  • sloc: sh: 363; python: 295; makefile: 21
file content (29 lines) | stat: -rwxr-xr-x 798 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
#
# https://wiki.debian.org/Gnome/Rust_Packaging


export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/rustc/architecture.mk
export DEB_HOST_RUST_TYPE
export PATH:=/usr/share/cargo/bin:$(PATH)
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)

%:
	dh $@ --buildsystem=cargo

execute_after_dh_auto_clean:
	$(CARGO) clean
	rm -rf $(CARGO_HOME)
	rm -rf $(CARGO_REGISTRY)
	rm -f debian/cargo-checksum.json

execute_before_dh_auto_configure:
	$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
	rm -f Cargo.lock
	touch debian/cargo-checksum.json