File: rules

package info (click to toggle)
sphinxbase 0.8%2B5prealpha%2B1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,568 kB
  • sloc: ansic: 28,814; sh: 11,817; makefile: 702; python: 335; perl: 121; yacc: 93; lex: 50
file content (53 lines) | stat: -rwxr-xr-x 1,663 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
#!/usr/bin/make -f

# Taken from the pygobject packaging.
PYVERS := $(shell pyversions -r)
PY3VERS := $(shell py3versions -r)

DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@  --with autoreconf,python2,python3

override_dh_auto_clean:
	set -e ; for pyver in $(PYVERS) $(PY3VERS); do \
	  rm -fr build-$$pyver ; \
	done
	dh_auto_clean

override_dh_auto_configure:
	set -e ; for pyver in $(PYVERS) $(PY3VERS); do \
	  mkdir -p build-$$pyver; \
	  PYTHON=/usr/bin/$$pyver dh_auto_configure -B build-$$pyver -- --includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH) ; \
	done

override_dh_auto_build:
	set -e ; for pyver in $(PYVERS) $(PY3VERS); do \
	  dh_auto_build -B build-$$pyver ; \
	done

ifeq (big,$(shell dpkg-architecture -qDEB_BUILD_ARCH_ENDIAN))
override_dh_auto_test:
	echo "Big-endian archs do not work yet and create hundreds of gigabytes of log, don't even try for now."
	false
else:
	set -e ; for pyver in $(PYVERS) $(PY3VERS); do \
	  dh_auto_test -B build-$$pyver ; \
	done
endif

override_dh_auto_install:
	set -e ; for pyver in $(PYVERS) $(PY3VERS); do \
	  dh_auto_install -B build-$$pyver ; \
	done
	for file in $$(find debian/tmp/usr/lib/ -name "*.la" -o -name _sphinxbase.a); do \
		rm $$file ; \
	done
	# sphinx_config.h is installed alongside the other header files. Make sure
	# it can be found.
	# https://bugs.launchpad.net/ubuntu/+bug/1648877
	sed --in-place s#sphinx_config\.h#sphinxbase/sphinx_config.h# \
		debian/tmp/usr/include/*/sphinxbase/ad.h \
		debian/tmp/usr/include/*/sphinxbase/prim_type.h \
		debian/tmp/usr/include/*/sphinxbase/sbthread.h