File: rules

package info (click to toggle)
monero 0.16.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 41,604 kB
  • sloc: cpp: 186,449; ansic: 38,841; python: 6,164; sh: 3,192; asm: 1,395; makefile: 530; perl: 205; awk: 67
file content (84 lines) | stat: -rwxr-xr-x 2,349 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/make -f

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

# generate documentation unless nodoc requested
DOCS_stem = README ANONYMITY_NETWORKS LEVIN_PROTOCOL
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS = $(foreach d,$(DOCS_stem),$d.html $d.txt)
endif

# reduce debugging information on 32bit archs
# to avoid some FTBFS (memory axhaustion of build environment?)
ifeq ($(DEB_HOST_ARCH_BITS),32)
export DEB_CXXFLAGS_MAINT_APPEND = -g1
endif

# explicitly link with libatomic
# to work around gcc bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358>
ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic -Wl,--as-needed
endif

DH_OPTIONS = -O--buildsystem=cmake

# detect if build targets experimental suite (or is a draft)
DEB_SUITE_EXP = $(filter experimental% UNRELEASED,$(DEB_DISTRIBUTION))

#testsuite needs writable $HOME
FAKEHOME = $(CURDIR)/debian/fakehome

# skip tests requiring network
GTEST_FILTER = address_from_url.*:dns_resolver.*
TEST_EXCLUDE = functional_tests_rpc

# skip slow tests
TEST_EXCLUDE += core_tests

# skip heavy test on architectures without FPU in baseline spec
ifneq (,$(filter $(DEB_HOST_ARCH), armel mipsel m68k))
TEST_EXCLUDE += hash-variant2-int-sqrt
endif

# skip tests possibly broken
TEST_EXCLUDE += $(if $(DEB_SUITE_EXP),,cnv4-jit hash-slow-4)

override_dh_auto_configure:
	dh_auto_configure -- -DARCH=default -DNO_AES=ON -DBUILD_TESTS=ON -DPYTHON_EXECUTABLE=/usr/bin/python3

override_dh_auto_build: $(DOCS)
	dh_auto_build

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	HOME="${FAKEHOME}" \
	GTEST_FILTER="$(GTEST_FILTER)" \
		dh_auto_test -- ARGS+="--output-on-failure -E '$(subst $() ,|,$(TEST_EXCLUDE))'" \
		$(if $(DEB_SUITE_EXP),|| true)
endif

override_dh_missing:
	dh_missing --fail-missing

override_dh_auto_clean:
	rm -rf "$(FAKEHOME)"
	dh_auto_clean

override_dh_installdocs:
	dh_installdocs --all -- $(DOCS)

# skip file failing with "Unknown DWARF DW_OP_255" (see bug#949296)
override_dh_dwz:
	dh_dwz --exclude=usr/lib/monero/tests/bin/performance_tests

override_dh_clean:
	dh_clean -- $(DOCS)

%.html: %.md
	pandoc --from gfm-raw_html --to html --standalone --output $@ $<

%.txt: %.md
	pandoc --from gfm-raw_html --to plain --output $@ $<

%:
	dh $@ $(DH_OPTIONS:-O%=%)