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
|