#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

# Fuse uWSGI and our package versions, flattened to native format
UWSGI_VERSION = $(shell dpkg-query --show --showformat '$${Version}' uwsgi-src)
OUR_BINARY_VERSION = $(subst -,+,$(UWSGI_VERSION))+$(DEB_VERSION)

%:
	dh $@

override_dh_auto_build:
	uwsgi --build-plugin /usr/src/uwsgi/plugins/emperor_mongodb
	uwsgi --build-plugin /usr/src/uwsgi/plugins/gridfs
	uwsgi --build-plugin /usr/src/uwsgi/plugins/mongodblog
	uwsgi --build-plugin /usr/src/uwsgi/plugins/stats_pusher_mongodb

override_dh_gencontrol:
	dh_gencontrol -- -v$(OUR_BINARY_VERSION)
