#!/usr/bin/make -f
# -*- makefile -*-
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

build-indep: build-stamp
build-arch:
build: build-indep build-arch
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 jar

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	[ ! -f build.xml ] || ant distclean

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/airport-utils.
	for jar in $(shell find $(CURDIR) -name "*.jar"); do cp $$jar debian/airport-utils/usr/share/java/airport-utils/; done

	cp debian/bin/* debian/airport-utils/usr/bin/
	chmod +x debian/airport-utils/usr/bin/*

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installchangelogs -i
	dh_installdocs -i
	dh_installmenu -i
	dh_installman -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch:
# We have nothing to do here.

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