#!/usr/bin/make -f

build_dir   = build
install_dir = debian/targetcli


%:
	dh $@ --with python2

override_dh_auto_clean:
	# manually clean any *.pyc files
	rm -rf targetcli/*.pyc

override_dh_auto_build:
	python setup.py build --build-base $(build_dir) 
	
	# Use upstream's init script
	test -f scripts/target.init && cp scripts/target.init debian/target.init

override_dh_auto_install:
	python setup.py install --prefix=/usr --no-compile  \
		--install-layout=deb --root=$(CURDIR)/$(install_dir)

override_dh_installinit:
	dh_installinit --name target
