File: rules

package info (click to toggle)
libseccomp 2.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,828 kB
  • sloc: ansic: 17,409; sh: 5,938; python: 1,519; makefile: 425
file content (37 lines) | stat: -rwxr-xr-x 925 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
#!/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

%:
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='$$pyver'; exit(0 if float(pyver[6:]) >= 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