File: rules

package info (click to toggle)
jujutsu 0.37.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,740 kB
  • sloc: sh: 283; makefile: 34
file content (46 lines) | stat: -rwxr-xr-x 1,392 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
42
43
44
45
46
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk
include /usr/share/rustc/architecture.mk
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_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)
export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow

%:
	dh $@ --buildsystem=cargo --with=bash-completion

execute_after_dh_auto_clean:
	rm -rf debian/cargo_registry debian/man debian/jujutsu.bash-completion

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

override_dh_installman:
	mkdir -p debian/man
	./debian/jujutsu/usr/bin/jj util install-man-pages ./debian/man
	dh_installman ./debian/man/*/*

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.md

override_dh_bash-completion:
	COMPLETE=bash ./debian/jujutsu/usr/bin/jj \
		> debian/jujutsu.bash-completion
	dh_bash-completion

override_dh_auto_build:
	$(CARGO) build --release --bins

override_dh_auto_test:
	# Tests are not building due to gix 0.69
	true

override_dh_auto_install:
	install -D -m755 target/$(DEB_HOST_RUST_TYPE)/release/jj debian/jujutsu/usr/bin/jj