#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

PYTHON_SITEARCH := $(shell python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')

export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed"

%:
	dh $@ --parallel --with python2,pkgkde-symbolshelper

override_dh_auto_configure:
	dh_auto_configure -- \
		-DPHP_BINDINGS=OFF \
		-DPYTHON_BINDINGS=ON \
		-DPYTHON_INSTALL_DIR=$(PYTHON_SITEARCH) \
		-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
		-DPYTHON_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpython2.7.so

override_dh_gencontrol:
	dh_gencontrol

override_dh_install:
	# Install the packages
	dh_install --fail-missing -Xdummy.php

override_dh_auto_test:

override_dh_shlibdeps:
	dh_shlibdeps -- -xkdepim-runtime 
