File: rules

package info (click to toggle)
pyside2 5.15.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 34,796 kB
  • sloc: python: 221,792; cpp: 78,062; xml: 17,007; sh: 68; makefile: 39; javascript: 16
file content (65 lines) | stat: -rwxr-xr-x 2,267 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
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

# Safety measure to ensure package names match SONAMEs
PYSIDE_MAJOR := $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1-2)
ifeq ($(shell awk '/Package:/ {print $$2}' debian/control | grep -- -$(PYSIDE_MAJOR)$$),)
    $(error Please update package names for major version $(PYSIDE_MAJOR))
endif
ifeq ($(shell ls debian/lib* | grep -- -$(PYSIDE_MAJOR)),)
    $(error Please update files debian/lib*.* for major version $(PYSIDE_MAJOR))
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    OPTION_JOBS = --parallel=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

export PYBUILD_NAME=pyside2
export PYBUILD_SYSTEM=distutils
export PYBUILD_BUILD_ARGS=--relwithdebinfo --verbose-build --no-examples --build-tests --ignore-git $(OPTION_JOBS)

export MAIN_VERSION_UPSTREAM := $(shell echo $(DEB_VERSION_UPSTREAM))
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Add CPPFLAGS to CXXFLAGS as CMake ignores CPPFLAGS by default
CXXFLAGS+=$(CPPFLAGS)

# Work around buildd bug (https://bugs.debian.org/842565)
undefine XDG_RUNTIME_DIR

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	#PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc/rst build/html # HTML generator

override_dh_auto_install:
	# Don't use pybuild install process, we take over this step to
	# split files in the way we want it. But we echo the list of files
	# built to make it easier to update *.install files.
	echo ">>> In pyside*_{package,install}"
	-find pyside*_install pyside*_build

override_dh_makeshlibs:
	dh_makeshlibs -VUpstream-Version

override_dh_install-indep:
	dh_install -X.doctrees

override_dh_install-arch:
	dh_install
	# remove RUNPATH setup in shiboken2
	chrpath -d debian/shiboken2/usr/bin/shiboken2
	# change the library path in pkg-info/*.pc and in *.cmake files:
	# during the build the path is setup to the build dir
	# /build/pyside2* (required to find lib during the build) but it's
	# not what we need
	debian/set-paths

override_dh_auto_test:
ifeq (mips64el,$(DEB_HOST_ARCH))
	# See https://bugs.debian.org/868745
	QSG_NO_DEPTH_BUFFER=1 xvfb-run python3 testrunner.py test
else
	xvfb-run python3 testrunner.py test
endif