#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

upstream:
	cd .. && git clone git://git.debian.org/git/users/daniel/live-webhelper.git || true
	rm -rf ../live-webhelper/.git

build:

clean:
	dh_testdir
	dh_testroot

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Installing package
	$(MAKE) install DESTDIR=$(CURDIR)/debian/live-webhelper

	# Removing double files
	rm -f debian/live-webhelper/usr/share/doc/live-webhelper/COPYING
	rm -f debian/live-webhelper/usr/share/doc/live-webhelper/ChangeLog

	# Installing lintian overrides
	set -e; for LINTIAN in debian/lintian/*; \
	do \
		install -D -m 0644 $$LINTIAN debian/`basename $$LINTIAN`/usr/share/lintian/overrides/`basename $$LINTIAN`; \
	done

binary-arch: build install

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs docs/ChangeLog
	dh_installdocs
	dh_install
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
