#!/usr/bin/make -f
# -*- makefile -*-

# get debian distribution codename
DISTRIBUTION=$(shell lsb_release -sc)
# get version from changelog, for string mangling
VERSION=$(shell dpkg-parsechangelog --count 1 --show-field Version)
# add distribution codename to package version
PACKAGEVERSION=$(subst ~,~$(DISTRIBUTION)-,$(VERSION))

export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_configure:
	./autogen.sh
	./configure --prefix=/usr --disable-doc --enable-static --enable-shared

# setting mangled package version
override_dh_gencontrol:
	dh_gencontrol -- -v$(PACKAGEVERSION)
