File: rules

package info (click to toggle)
fife 0.3.3%2Br3-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 16,312 kB
  • sloc: cpp: 83,234; python: 16,261; sh: 10,134; xml: 3,435; makefile: 265; objc: 245; ansic: 229
file content (40 lines) | stat: -rwxr-xr-x 1,293 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
#!/usr/bin/make -f

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	SCONSOPTS += -j$(NUMJOBS)
endif

export PYVERS=$(shell pyversions -vr)

%:
		dh $@ --with python2

override_dh_auto_configure:	$(PYVERS:%=debian/stamps/configure-python%)
debian/stamps/configure-python%:
	mkdir build-python$*
	cp -r build engine ext utils SConstruct setup.py test_fife.py build-python$*
	find build-python$*/engine/core/ext/tinyxml -type f -a \! -name fife_tinyxml.h -delete
	touch $@

override_dh_auto_build:	$(PYVERS:%=debian/stamps/build-python%)
debian/stamps/build-python%:
	python$* $(shell which scons) -C build-python$* fife-python $(SCONSOPTS)

override_dh_auto_test:	$(PYVERS:%=debian/stamps/test-python%)
debian/stamps/test-python%:
	python$* $(shell which scons) -C build-python$* tests $(SCONSOPTS)


override_dh_auto_install:	$(PYVERS:%=debian/stamps/install-python%)
debian/stamps/install-python%:
	python$* $(shell which scons) -C build-python$* DESTDIR=$(CURDIR)/debian/python-fife install-python $(SCONSOPTS)
	find $(CURDIR)/debian/python-fife -name '*.so' -exec chrpath -d {} \;

override_dh_auto_clean:
	rm -fr build-python*
	rm -f debian/stamps/*
	dh_clean

# override_dh_builddeb:
# 	dh_builddeb -- -Zxz