File: rules

package info (click to toggle)
ust 2.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,360 kB
  • sloc: ansic: 33,193; sh: 5,404; java: 1,898; makefile: 1,198; python: 701; cpp: 177
file content (47 lines) | stat: -rwxr-xr-x 1,104 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

EXTRA_CONF_OPTS =
EXTRA_DH_OPTS =

# Disable java packages on architecture that don't have
# an openjdk port.
nojava_archs = hppa
ifneq (,$(filter $(DEB_HOST_ARCH), $(nojava_archs)))
export DEB_BUILD_PROFILES += nojava
endif

ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
export JAVA_HOME = /usr/lib/jvm/default-java
export CLASSPATH = /usr/share/java/log4j-1.2.jar

EXTRA_DH_OPTS += --with javahelper

EXTRA_CONF_OPTS += --enable-jni-interface \
		   --enable-java-agent-all \
		   --with-java-prefix=$(JAVA_HOME)
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with=python3 $(EXTRA_DH_OPTS)

override_dh_auto_configure:
	PYTHON=python3 \
	dh_auto_configure -- \
		--includedir=/usr/include/$(DEB_HOST_MULTIARCH) \
		--enable-python-agent \
		$(EXTRA_CONF_OPTS)

ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),)
override_dh_makeshlibs:
	dh_makeshlibs -V -X/usr/lib/$(DEB_HOST_MULTIARCH)/jni

override_jh_manifest:
	jh_manifest -pliblttng-ust-agent-java
endif