File: rules

package info (click to toggle)
libpfm4 4.11.1%2Bgit32-gd0b85fb-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,724 kB
  • sloc: ansic: 172,126; makefile: 689; python: 183; sh: 17
file content (52 lines) | stat: -rwxr-xr-x 1,280 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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DPKG_EXPORT_BUILDFLAGS	 = yes
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk

# Upstream does not use CPPFLAGS
CFLAGS	+= $(CPPFLAGS)

# architecture mapping $(DEB_HOST_ARCH) => libpfm4 ARCH
# in case that can't be derived from the cpu correctly
# e.g. cross-compiling for a 32-bit architecture on a 64-bit cpu
LIBPFM4_ARCH_armel	 = arm
LIBPFM4_ARCH_armhf	 = arm
LIBPFM4_ARCH_i386	 = i386
LIBPFM4_ARCH_ppc64el	 = powerpc

LIBPFM4_ARCH_FLAG	 = $(foreach a,$(strip $(LIBPFM4_ARCH_$(DEB_HOST_ARCH))),ARCH=$a)

%:
	dh  $@

override_dh_auto_build:
	dh_auto_build -- $(LIBPFM4_ARCH_FLAG)

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	./tests/validate
endif

override_dh_auto_install:
	$(MAKE) install \
		DESTDIR=$(CURDIR)/debian/tmp \
		PREFIX=/usr \
		LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
		LDCONFIG=true \
		$(LIBPFM4_ARCH_FLAG)

override_dh_missing:
	dh_missing --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -a -- -c4

override_dh_shlibdeps:
	dh_shlibdeps -a -- --warnings=7