#!/usr/bin/make -f

package=libunicode-map8-perl
tempdir=$(shell pwd)/debian/tmp
arch=$(shell dpkg --print-architecture)

build: build-stamp
build-stamp:
	dh_testdir
	perl Makefile.PL INSTALLDIRS=vendor
	$(MAKE) OPTIMIZE="-O2 -g -Wall" all
	-$(MAKE) test
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp
	if [ -e Makefile ]; then  \
		$(MAKE) distclean; \
	else \
		perl Makefile.PL && $(MAKE) clean; \
	fi;
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

# Add here commands to install the package into debian/tmp.
	$(MAKE) PREFIX=$(tempdir)/usr install
	dh_installdocs
	dh_installman
	dh_installchangelogs

	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_compress
	dh_strip
	dh_fixperms
	dh_perl
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Below here is fairly generic really
binary: binary-indep binary-arch
.PHONY: binary clean checkroot

#Local variables:
#mode: makefile
#End:
