#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed
export QT_SELECT = qt5

include /usr/share/dpkg/default.mk

auto_build_cmd = $(1) -D"Project/GNU/CLI/"

%::
	dh $@ --with=autoreconf

override_dh_auto_configure:
	$(call auto_build_cmd,dh_auto_configure)

override_dh_auto_build:
	$(call auto_build_cmd,dh_auto_build)

override_dh_auto_install:
	$(call auto_build_cmd,dh_auto_install)

override_dh_auto_clean:
	$(call auto_build_cmd,dh_auto_clean)

override_dh_installman: debian/mediaconch.1
	dh_installman

override_dh_installchangelogs:
	dh_installchangelogs -p mediaconch History_CLI.txt

clean:
	rm -f debian/*.1
	dh clean --with=autoreconf

%.1: %.pod
	pod2man --center "User Commands" --release=MediaConch\ $(DEB_VERSION_UPSTREAM) $< > $@
