#!/usr/bin/make -f
# -*- makefile -*-

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


%:
	dh $@ --with python2

override_dh_install:
	# Fixing example conffile location as dh_install cannot rename
	mkdir -p $(CURDIR)/debian/tmp/etc
	cp -a $(CURDIR)/deejayd/ui/defaults.conf\
	      $(CURDIR)/debian/tmp/etc/deejayd.conf

	# Removing jquery embedded copy, see debian/deejayd-webui.links
	rm $(CURDIR)/debian/tmp/usr/share/deejayd/htdocs/js/lib/jquery.js

	dh_install

	# Install XUL extension using helper
	install-xpi -p xul-ext-deejayd-webui extensions/deejayd-webui.xpi

override_dh_installinit:
	# Inspired by mpd packaging, so that ALSA scripts can run first
	dh_installinit -u"defaults 30 15"
	# Inspired by gdm packaging
	dh_installinit --name=deejayd-xserver -u"defaults 30 01"

override_dh_python2:
	dh_python2 -Ndeejayd-webui-extension
