#!/usr/bin/make -f

PACKAGE = colortest

PKGDIR ?= $(shell pwd)/debian/$(PACKAGE)
DOCDIR  = debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/doc
BINDIR  = $(PKGDIR)/usr/bin
c       = "User Commands"

man:
	$(MAKE) -C debian -f pod2man.mk PODCENTER=$c PACKAGE=colortest-8 makeman
	$(MAKE) -C debian -f pod2man.mk PODCENTER=$c PACKAGE=colortest-16
	$(MAKE) -C debian -f pod2man.mk PODCENTER=$c PACKAGE=colortest-16b
	$(MAKE) -C debian -f pod2man.mk PODCENTER=$c PACKAGE=colortest-256 makeman

override_dh_auto_install: man
	install -m 755 -d $(BINDIR)
	install -m 755 8colors.sh $(BINDIR)/colortest-8
	install -m 755 16colors.sh $(BINDIR)/colortest-16
	install -m 755 colortable16.sh $(BINDIR)/colortest-16b
	install -m 755 256colors2.pl $(BINDIR)/colortest-256

	# These are not installed, because:
	# - Does not reset terminal back to defaults (colors stick)

	: || colortest

	# - Is same as 256colors2, but on Python.
	# - Would need extra dependency on "python"

	: || terminal_colors

%:
	dh  $@

.PHONY: man configure build binary-arch

# End of file
