#!/usr/bin/make -f

#export DH_VERBOSE=1

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
    NUMJOBS = auto
endif

%:
	dh $@ --with python2

override_dh_clean:
	rm -f debian/README
	dh_clean

override_dh_auto_build-arch:
	dh_auto_build -- --arch-only

override_dh_auto_build-indep:
	python tools/create_docs.py --skip-install README=debian/README
	dh_auto_build -- --parallel=$(NUMJOBS) --indep-only --pyqt4

override_dh_auto_install-arch:
	dh_auto_install -- --install-lib=/usr/lib/pybik \
	                   --arch-only

override_dh_auto_install-indep:
	dh_auto_install -- --install-scripts=/usr/lib/pybik \
	                   --install-lib=/usr/lib/pybik \
	                   --data-dir=/usr/share \
	                   --indep-only


