#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

%:
	dh $@ --with python2 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	chmod 0644 debian/gplaycli/etc/gplaycli/cronjob

override_dh_clean:
	dh_clean
	rm -rf GPlayCli.egg-info/

COMMIT_TO_DOWNLOAD = 20f65ca91820018fe3f1a076238ec7293ceada9b
newtarball = new$(COMMIT_TO_DOWNLOAD).tar.gz
get-orig-source:
	wget --continue -O $(newtarball) \
		https://github.com/matlink/gplaycli/archive/$(COMMIT_TO_DOWNLOAD).tar.gz
	mk-origtargz \
		--rename \
		--repack \
		--exclude-file debian \
		--exclude-file ext_libs/androguard \
		$(newtarball)
