#!/usr/bin/make -f

PKGDIR=opt/extras.ubuntu.com/unity-lens-askubuntu

%:
	dh $@ --with python2

override_dh_auto_install:
	dh_auto_install -- --install-lib=/$(PKGDIR)/ --install-scripts=/$(PKGDIR)/

override_dh_python2:
	# Disabled as it installs files outside /opt
	#dh_python2 /$(PKGDIR)/

override_dh_compress:
	dh_compress
	set -e; \
		cd $(CURDIR)/debian/unity-lens-askubuntu; \
		mv usr/share/doc/unity-lens-askubuntu $(PKGDIR)/doc; \
		rmdir usr/share/doc

override_dh_installdeb:
	dh_apparmor --profile-name=opt.extras.ubuntu.com.unity-lens-askubuntu.unity-askubuntu-daemon -punity-lens-askubuntu
	dh_installdeb

override_dh_gencontrol:
	dh_gencontrol
	cp unity-lens-askubuntu.png ../unity-lens-askubuntu.png
	dpkg-distaddfile unity-lens-askubuntu.png raw-meta-data -
