#!/usr/bin/make -f

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

MAKE_OPTIONS = DVBDIR=/usr VDRDIR=/usr/include/vdr LIBDIR=. \
               LOCALEDIR=debian/tmp/usr/share/locale
CXXFLAGS += $(shell pkg-config vdr --variable=cxxflags)

%:
	dh $@ --parallel

override_dh_auto_build:
	dh_auto_build -- all $(MAKE_OPTIONS)
	txt2man -s 1 -t xineplayer -v "video player fro vdr-plugin-xineliboutput" debian/xineplayer.1.txt >xineplayer.1

override_dh_auto_clean:
	$(MAKE) -o .dependencies clean $(MAKE_OPTIONS)
	rm -rf libvdr-*.so.* xineplayer.1

override_dh_gencontrol:
	sh /usr/share/vdr-dev/dependencies.sh
	dh_gencontrol

override_dh_installchangelogs:
	dh_installchangelogs -- HISTORY
