File: rules

package info (click to toggle)
pyatspi 2.20.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,780 kB
  • ctags: 862
  • sloc: sh: 11,465; python: 2,134; makefile: 68
file content (44 lines) | stat: -rwxr-xr-x 1,395 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
38
39
40
41
42
43
44
#!/usr/bin/make -f

# Taken from the pygobject packaging.
PYDEFAULTVER := $(shell pyversions --default --version)
PYVERS := $(shell pyversions --requested --version debian/control)
PYVERS := $(filter-out $(PYDEFAULTVER), $(PYVERS)) $(PYDEFAULTVER) $(shell py3versions --supported --version)

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

configure_flags += \
                --prefix=/usr \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --disable-maintainer-mode

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
        configure_flags += --host=$(DEB_HOST_GNU_TYPE)
endif

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

override_dh_auto_configure:
	set -e ; for pyver in $(PYVERS); do \
	    mkdir -p $(CURDIR)/build-$$pyver; \
	    cd $(CURDIR)/build-$$pyver && \
	       PYTHON=/usr/bin/python$$pyver ../configure $(configure_flags); \
	done

override_dh_auto_build:
	set -e ; for pyver in $(PYVERS); do \
	    PYTHON=/usr/bin/python$$pyver make -C $(CURDIR)/build-$$pyver; \
	done

override_dh_auto_install:
	set -e ; for pyver in $(PYVERS); do \
	    PYTHON=/usr/bin/python$$pyver make -C $(CURDIR)/build-$$pyver install DESTDIR=$(CURDIR)/debian/tmp; \
	done

override_dh_auto_clean:
	-for pyver in $(PYVERS); do \
	    rm -rf $(CURDIR)/build-$$pyver; \
	done
	dh_auto_clean