#!/usr/bin/make -f

# possible values are: `maemo5`, `geoclue`
# default is `geoclue`
GEOLOCATION_TYPE=maemo5

# debhelper7 -> debhelper magic, see
# http://wiki.maemo.org/Packaging#Debhelper_7
# python2.5 magic, see http://wiki.maemo.org/PyMaemo/FAQ
PATH:=/usr/bin/dh7:/usr/bin:$(PATH)
export PATH

SBOX_REDIRECT_IGNORE=/usr/bin/perl:/usr/bin/python
export SBOX_REDIRECT_IGNORE

export DH_VERBOSE=1

build:
	# copy implementation of the geolocation extension depending on the 
	# value of the GEOLOCATION_TYPE variable to geolocation/geolocation.py
	cp geolocation/geolocation_$(GEOLOCATION_TYPE).py geolocation/geolocation.py
	dh build
	
clean:
	rm -f geolocation/geolocation.py
	dh clean

%:
	dh $@

override_dh_pysupport:
	dh_pysupport /usr/share/zeitgeist
