#!/usr/bin/make -f

%:
	dh $@ --with xul-ext

override_dh_auto_build:
	python build.py build --release

override_dh_auto_install:
	install-xpi adblockplus*.xpi

override_dh_installchangelogs:
	dh_installchangelogs $(CURDIR)/debian/adblock-plus.upstream-changelog

get-orig-source:
	VERSION=$(shell uscan --force --dehs | \
		grep upstream-version | \
		sed 's,<upstream-version>\(.*\)</upstream-version>,\1+dfsg,') ; \
		wget -O ../adblock-plus_$$VERSION.orig-buildtools.tar.gz \
		https://github.com/adblockplus/buildtools/archive/master.tar.gz ; \
		wget -O ../adblock-plus_$$VERSION.orig-jshydra.tar.gz \
		https://github.com/adblockplus/jshydra/archive/master.tar.gz
