#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS


%:
	dh $@

build:
	dh build --before configure
	./configure --prefix=/usr \
		--includedir=/usr/include \
		--sysconfdir=/etc/c-icap \
		--localstatedir=/var \
		--libexecdir=/usr/lib/c_icap
	dh build --after configure

override_dh_fixperms:
	dh_fixperms
	chmod 0644 debian/c-icap/etc/c-icap/*

override_dh_install:
	/usr/bin/chrpath -d debian/tmp/usr/bin/c-icap
	/usr/bin/chrpath -d debian/tmp/usr/bin/c-icap-client
	/usr/bin/chrpath -d debian/tmp/usr/bin/c-icap-mkbdb
	dh_install
	
.PHONY: override_dh_strip
override_dh_strip:
	dh_strip --dbg-package=libicapapi0-dbg

