#!/usr/bin/make -f

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

ELEKTRA_PLUGINS="dump;resolver;hidden;iconv;syslog;error;ccode;hosts;tracer;fstab;network;null;path;simpleini;ni;success;tcl;timeofday;type;xmltool"
#ELEKTRA_PLUGINS="dump;resolver;hidden;iconv;syslog;error;validation;xmltool;tracer;timeofday;dbus;glob;hosts;network;type;struct;path;fstab;ccode;simplei;ni;tcl;hexcode;null;ni"

# Make sure libelektra2 is built before packages depending on it
binary/libelektra-bin binary/libelektra-dev:: binary/libelektra2

install/libelektra-bin::
	install -m 644 debian/kdb.1 debian/tmp/usr/share/man/man1

CMAKE_FLAGS = \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DPLUGINS=$(ELEKTRA_PLUGINS) \
	-DKDB_DB_SYSTEM:PATH="/etc/kdb" \
	-DKDB_DB_HOME:PATH="/home" \
	-DKDB_DB_USER:PATH=".kdb"

%:
	dh $@ --buildsystem=cmake --parallel

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_auto_test:

override_dh_installdocs:
