File: rules

package info (click to toggle)
rust-sequoia-chameleon-gnupg 0.13.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,908 kB
  • sloc: sh: 188; makefile: 79; pascal: 9
file content (36 lines) | stat: -rwxr-xr-x 876 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
30
31
32
33
34
35
36
#!/usr/bin/make -f

#export DH_VERBOSE = 1
export ASSET_OUT_DIR=debian/tmp

include /usr/share/dpkg/pkg-info.mk

# Disable lto on 32-bit arches since it OOMs otherwise
execute_before_dh_auto_configure:
ifeq ($(DEB_HOST_ARCH_BITS),32)
export DEB_BUILD_OPTIONS += optimize=-lto
endif

# enable on 64-bit
execute_after_dh_auto_configure:
ifeq ($(DEB_HOST_ARCH_BITS),64)
	echo 'lto="fat"' >> debian/cargo_home/config.toml
	echo 'codegen-units=1' >> debian/cargo_home/config.toml
	echo 'opt-level="z"' >> debian/cargo_home/config.toml
	cat debian/cargo_home/config.toml
endif

%:
	dh $@ --buildsystem cargo

# skip these targets on arch:all builds
override_dh_auto_test-indep:
override_dh_auto_build-indep:
override_dh_auto_install-indep:
	dh_install

override_dh_install-arch:
	mkdir -p debian/gpg-sq/usr/bin/
	mv debian/gpgv-sq/usr/bin/gpg-sq debian/gpg-sq/usr/bin/

	dh_install