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

export SHELL=/bin/bash

%:
	dh $@

override_dh_auto_clean:
	rm -f .mozconfig
	dh_auto_clean
	find . -name '*.pyc' -delete

override_dh_auto_configure:
	cp debian/mozconfig mozconfig

override_dh_auto_build:
	./mach build

override_dh_auto_install:
	chmod +x $$(pwd)/debian/waterfox-bin.sh
	DESTDIR=$$(pwd)/debian/waterfox ./mach install
	mv $$(pwd)/debian/waterfox/usr/lib/waterfox/browser/features/ $$(pwd)
	rm -rf $$(pwd)/debian/waterfox/usr/lib/waterfox/waterfox-bin
	rm -rf $$(pwd)/debian/waterfox/usr/lib/waterfox/dictionaries

override_dh_shlibdeps:
	dh_shlibdeps -l /usr/lib/waterfox/waterfox

override_dh_builddeb:
	dh_builddeb -- -Z xz