File: rules

package info (click to toggle)
sphinxbase 0.8%2B5prealpha%2B1-21
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,672 kB
  • sloc: ansic: 28,813; sh: 11,829; makefile: 699; python: 338; perl: 121; yacc: 93; lex: 50
file content (51 lines) | stat: -rwxr-xr-x 1,449 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
#!/usr/bin/make -f

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

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
endif

%:
	dh $@

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

override_dh_auto_configure:
	set -e ; for pyver in $(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 $(PY3VERS); do \
	  dh_auto_build -B build-$$pyver ; \
	done

override_dh_auto_test:
	set -e ; for pyver in $(PY3VERS); do \
	  dh_auto_test -B build-$$pyver ; \
	done

override_dh_auto_install:
	set -e ; for pyver in $(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