#!/usr/bin/make -f

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

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

build: build-stamp
build-stamp:
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean
	rm -rf $(CURDIR)/debian/tmp

install: build
	dh_testdir
	dh_testroot
	#dh_prep
	mkdir -p $(CURDIR)/debian/tmp/usr/share/perl5/Audio
	cp lib/Audio/RPLD.pm $(CURDIR)/debian/tmp/usr/share/perl5/Audio/

binary-arch: build install

binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_link -i
	dh_install -i --list-missing --sourcedir=debian/tmp
	dh_installdocs -i
	dh_installchangelogs -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_perl -i
	dh_shlibdeps -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

get-orig-source:
	@@dh_testdir
	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
	@@uscan --force-download --destdir ../tarballs

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