File: rules

package info (click to toggle)
libpfm4 4.13.0%2Bgit99-gc5587f9-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,860 kB
  • sloc: ansic: 233,278; makefile: 786; python: 183; sh: 18
file content (41 lines) | stat: -rwxr-xr-x 1,080 bytes parent folder | download | duplicates (2)
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
#!/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_amd64	 = x86_64
LIBPFM4_ARCH_armel	 = arm
LIBPFM4_ARCH_armhf	 = arm
LIBPFM4_ARCH_ppc64el	 = powerpc

LIBPFM4_ARCH_FLAG	 = ARCH=$(or $(LIBPFM4_ARCH_$(DEB_HOST_ARCH_CPU)),$(DEB_HOST_ARCH_CPU))

%:
	dh  $@

override_dh_auto_build:
	dh_auto_build -- $(LIBPFM4_ARCH_FLAG)

override_dh_auto_test:
	./tests/validate

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