#!/usr/bin/make -f 

build: build-stamp
build-stamp:
	dh_testdir
	touch $@

clean:
	$(RM) -r build-stamp install-stamp test-stamp
	$(RM) debian/copyright
	$(MAKE) $@
	$(MAKE) -C po $@
	$(RM) po/*.mo
	dh_clean

test: test-stamp
test-stamp: install-stamp
	$(MAKE) test DESTDIR="$(CURDIR)/debian/linda"
	touch $@

install: build-stamp install-stamp
install-stamp:
	$(MAKE) install DESTDIR="$(CURDIR)/debian/linda"
	ln -s $(CURDIR)/copyright $(CURDIR)/debian/copyright
	$(MAKE) -C po install DESTDIR="$(CURDIR)/debian/linda"
	touch $@

binary-indep: build-stamp install-stamp test-stamp
	dh_testroot
	dh_installdirs
	dh_installdocs -X.svn
	dh_installman
	dh_installchangelogs
	dh_python
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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