#!/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 adh-make.

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

clean:
	dh_testdir
	dh_auto_clean
	dh_clean
	rm -f config.log config.status settings tucnak.map
	rm -f src/tucnak.map src/settings.c src/map2d src/tucnak.d

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	dh_auto_configure
	dh_auto_build
	dh_auto_test

binary-indep: build

binary-arch: build
	dh_testroot
	dh_prep
	dh_installdirs
	dh_auto_install
	dh_install
	dh_installdocs AUTHORS README NEWS TODO
	dh_installchangelogs ChangeLog
	dh_installman debian/tucnak.1 debian/soundwrapper.1
	dh_installmenu
	dh_lintian
	cp share/pixmaps/tucnak.xpm debian/tucnak/usr/share/pixmaps
	dh_icons
	dh_link usr/share/man/man1/tucnak.1.gz usr/share/man/man1/tucnak.1.gz
	dh_installudev --priority=60 tucnak.rules
	dh_compress
	dh_fixperms
	dh_strip
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb


install:
	install -s src/tucnak debian/tucnak/usr/bin/tucnak


checkroot:
	dh_testdir
	dh_testroot

binary: binary-indep binary-arch

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