File: rules

package info (click to toggle)
ltt-control 2.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,860 kB
  • sloc: cpp: 192,012; sh: 28,777; ansic: 10,960; python: 7,108; makefile: 3,520; java: 109; xml: 46
file content (57 lines) | stat: -rwxr-xr-x 1,890 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)


export DEB_BUILD_MAINT_OPTIONS := hardening=+all

PY3V := $(shell py3versions -vr)

%:
	dh $@ --with bash-completion,python3

override_dh_autoreconf:
	dh_autoreconf
	# autoreconf updates the timestamps on the Makefiles,
	# update them on the pre-generated man pages to make
	# sure they are newer and the build system doesn't try
	# to re-generate them.
	touch doc/man/*.1 doc/man/*.3 doc/man/*.8

# Only run the test suite on architectures with reasonnably fast builders
ifneq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 arm64 ppc64el i386))
# The test suite doesn't yet support running in parallel
override_dh_auto_test:
	# The test suite requires a writabel home directory to test
	# the lttng cli and sbuild sets this to a non-existent directory.
	# Workaround by creating a temporary writeable home dir.
	mkdir "$(CURDIR)/debian/home"
	HOME="$(CURDIR)/debian/home" dh_auto_test --no-parallel
else
# Disable the test suite
override_dh_auto_test:
endif

override_dh_auto_install:
	dh_auto_install
	for pv in $(PY3V); do \
	  PYTHON=python$${pv} PYTHON_CONFIG=python$${pv}-config \
	    dh_auto_configure -- --enable-python-bindings; \
	  cd extras/bindings/swig/python; \
	  make clean; \
	  make install DESTDIR="$(CURDIR)/debian/tmp"; \
	  mv "$(CURDIR)/debian/tmp/usr/lib/python$${pv}/site-packages" \
	     "$(CURDIR)/debian/tmp/usr/lib/python$${pv}/dist-packages"; \
	  find "$(CURDIR)/debian/tmp/usr/lib/python$${pv}" -type l -delete; \
	  mv "$(CURDIR)/debian/tmp/usr/lib/python$${pv}/dist-packages/_lttng.so.0.0.0" \
	     "$(CURDIR)/debian/tmp/usr/lib/python$${pv}/dist-packages/_lttng.so"; \
	  cd $(CURDIR); \
	done

override_dh_installinit:
	dh_installinit --name=lttng-sessiond

override_dh_installsystemd:
	dh_installsystemd --name=lttng-sessiond