#!/usr/bin/make -f

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
		dh_auto_configure -- -Db_ndebug=true \
				-Dasync_connect=true \
				-Dcolors=true \
				-Dchat_screen=true \
				-Dcurses=ncursesw \
				-Ddocumentation=auto \
				-Dkey_screen=true \
				-Dhelp_screen=true \
				-Dhtml_manual=false \
				-Dlibrary_screen=true \
				-Dlyrics_screen=true \
				-Dlyrics_plugin_dir="/usr/libexec/ncmpc/lyrics/" \
				-Dlirc=enabled \
				-Dlocale=enabled \
				-Dmanual=true \
				-Dmini=false \
				-Dmouse=enabled \
				-Dmultibyte=true \
				-Dnls=enabled \
				-Doutputs_screen=true \
				-Dplaylist_editor=false \
				-Dregex=enabled \
				-Dsearch_screen=true \
				-Dsong_screen=true

override_dh_auto_install:
	dh_auto_install
	# Examples installed with dh_installexamples, cf. debian/ncmpc.examples
	rm debian/tmp/usr/share/doc/ncmpc/config.sample
	rm debian/tmp/usr/share/doc/ncmpc/keys.sample
	rm debian/tmp/usr/share/doc/ncmpc/ncmpc.lirc
	# Remove useless doc files
	rm debian/tmp/usr/share/doc/ncmpc/COPYING
	rm debian/tmp/usr/share/doc/ncmpc/NEWS

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_installdocs:
	dh_installdocs -A AUTHORS
