File: rules

package info (click to toggle)
libseccomp 2.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,408 kB
  • sloc: ansic: 17,386; sh: 6,482; python: 1,656; makefile: 438
file content (40 lines) | stat: -rwxr-xr-x 1,045 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
#!/usr/bin/make -f
# -*- makefile -*-

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

# Enable verbose build details.
export V=1

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildopts.mk

export LIBSECCOMP_TSTCFG_JOBS=$(DEB_BUILD_OPTION_PARALLEL)

%:
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
	dh $@ --with python3
else
	dh $@
endif

ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)

override_dh_auto_install:
	dh_auto_install
	for pyver in `py3versions -s`; do \
		set -e; \
		if python3 -c "pyver=tuple(map(int, '$$pyver'[6:].split('.'))); exit(0 if pyver >= (3,8) else 1)"; then \
			export _PYTHON_SYSCONFIGDATA_NAME='_sysconfigdata__${DEB_HOST_ARCH_OS}_${DEB_HOST_MULTIARCH}'; \
		else \
			export _PYTHON_SYSCONFIGDATA_NAME='_sysconfigdata_m_${DEB_HOST_ARCH_OS}_${DEB_HOST_MULTIARCH}'; \
		fi; \
		dh_auto_configure -- --enable-python PYTHON=$$pyver; \
		dh_auto_install --sourcedirectory=src/python -- PYTHON=$$pyver; \
	done
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -f regression.out