File: rules

package info (click to toggle)
meson 0.37.1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,588 kB
  • ctags: 2,830
  • sloc: python: 19,254; ansic: 2,587; cpp: 506; sh: 87; asm: 78; xml: 48; makefile: 38; java: 36; cs: 29; lisp: 27; f90: 22; objc: 12; lex: 8; yacc: 5
file content (72 lines) | stat: -rwxr-xr-x 2,611 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
66
67
68
69
70
71
72
#!/usr/bin/make -f

# Meson does not use Debhelper's distutils/setuptools
# module as it has a few problems:
#
# - assumes that package is a "library" and enforces
#   a prefixed name of python3-meson (which we don't
#   want).
# - splitting one source package into multiple binary
#   packages was insurmountable (may be possible but
#   there is no documentation on how to do this with
#   the Python helper, it overrides something so guides
#   for regular packages don't work)


# Print all logging info to stdout so it
# shows up in build logs.

export MESON_PRINT_TEST_OUTPUT=1
export QT_SELECT=qt5

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

override_dh_auto_configure:
	echo "Meson does not need to be configured."

override_dh_auto_build:
	echo "Build step overridden so dh_python3 won't run its own."

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	./run_tests.py
endif

override_dh_clean:
	dh_clean
	rm -f *.pyc
	rm -rf __pycache__
	rm -rf mesonbuild/__pycache__
	rm -rf mesonbuild/*/__pycache__
	rm -rf work\ area
	rm -rf install\ dir/*
	rm -f meson-test-run.txt meson-test-run.xml
	rm -rf meson.egg-info
	rm -rf build
	rm -rf .pybuild

override_dh_install:
	python3 setup.py install --root=$$(pwd)/debian/meson --prefix=/usr --install-layout=deb --install-lib=/usr/share/meson --install-scripts=/usr/share/meson
# For some reason these Python 2 files are generated during
# install. Get rid of them and the egg info which is only
# useful for public packages.
	rm -rf $$(pwd)/debian/meson/usr/lib/python3*
	rm -rf $$(pwd)/debian/meson/usr/share/meson/meson*.egg-info
	rm -rf $$(pwd)/debian/meson/usr/share/meson/mesonbuild/__pycache__
	rm -rf $$(pwd)/debian/meson/usr/share/meson/mesonbuild/*/__pycache__
# Debian's Python packaging insist on copying scripts to /usr/bin
# because they assume that any modules they import are in the public
# PYTHONPATH. Meson has an internal library that is not, so this
# fails. Replace them with symlinks inside the private package
# so it works. This behaviour is Debian packaging specific.
# If you run the same commands outside of pbuilder, the scripts
# are not copied.
	rm $$(pwd)/debian/meson/usr/bin/meson
	rm $$(pwd)/debian/meson/usr/bin/mesonconf
	rm $$(pwd)/debian/meson/usr/bin/mesonintrospect
	rm $$(pwd)/debian/meson/usr/bin/wraptool
	ln -s ../share/meson/meson $$(pwd)/debian/meson/usr/bin/meson
	ln -s ../share/meson/mesonconf $$(pwd)/debian/meson/usr/bin/mesonconf
	ln -s ../share/meson/mesonintrospect $$(pwd)/debian/meson/usr/bin/mesonintrospect
	ln -s ../share/meson/wraptool $$(pwd)/debian/meson/usr/bin/wraptool