File: rules

package info (click to toggle)
opentelemetry-cpp 1.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 8,744 kB
  • sloc: cpp: 79,029; sh: 1,640; makefile: 43; python: 31
file content (46 lines) | stat: -rwxr-xr-x 1,333 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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

CONFIGURE_OPTS :=	-DBUILD_SHARED_LIBS=ON \
					-DWITH_OTLP_HTTP=ON \
					-DWITH_OTLP_GRPC=ON \
					-DWITH_ABSEIL=ON \
					-DOPENTELEMETRY_INSTALL=ON \
					-DOTELCPP_PROTO_PATH=/usr/include/

%:
	dh $@

override_dh_auto_configure:
	mkdir -p $(CURDIR)/third_party/googletest/
	ln -s /usr/src/googletest/googlemock/ \
		$(CURDIR)/third_party/googletest/
	ln -s /usr/src/googletest/googletest/ \
		$(CURDIR)/third_party/googletest/

	dh_auto_configure -- $(CONFIGURE_OPTS)

override_dh_auto_install:
	dh_auto_install
	rm -rf $(CURDIR)/debian/tmp/usr/include/opentelemetry/proto/

# The test suite has some tests that fail in all the architectures. See
# debian/patches/disable-tests.patch. However, builds in architectures such as
# armhf and i386 end up with even more failing tests.
#
# Some curl-related tests fail when running on multiple CPU cores.
override_dh_auto_test:
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 mips64el ppc64el))
	dh_auto_test --max-parallel=1
else
	dh_auto_test --max-parallel=1 || true
endif

override_dh_auto_clean:
	dh_auto_clean
	-rm -f $(CURDIR)/third_party/googletest/googlemock
	-rm -f $(CURDIR)/third_party/googletest/googletest