#!/usr/bin/make -f

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	./configure --prefix=/usr
	$(MAKE)
	touch build

clean:
	dh_testdir
	-rm -f build
	[ ! -f Makefile ] || $(MAKE) distclean
	-rm -f `find . -name "*~"`
	-rm -rf debian/aprsdigi debian/files* core debian/substvars
	-rm -rf debian/aprsdigi.substvars *.html
	dh_clean

binary-indep:	build
	dh_testdir
	dh_testroot
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	build
	dh_testdir
	dh_clean
	dh_installdirs
	$(MAKE) install DESTDIR=`pwd`/debian/aprsdigi/

	dh_installdocs README AUTHORS TODO NEWS
	dh_installman aprsdigi.8 aprsmon.8
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Below here is fairly generic really

binary:		binary-indep binary-arch

