#! /usr/bin/make -f
#
# debian/rules
#
# Copyright © 2010 Ben Finney <ben+debian@benfinney.id.au>
# This is free software; you may copy, modify and/or distribute this work
# under the terms of the GNU General Public License, version 2 or later.
# No warranty expressed or implied.
# See the file ‘/usr/share/common-licenses/GPL-2’ for details.

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

PACKAGEDIR = $(CURDIR)/debian/comixcursors
ICONDIR=usr/share/icons
WRAPPERDIR=etc/X11/cursors


.PHONY: build
build:
	dh build

.PHONY: clean
clean:
	dh clean

.PHONY: install
install: export ICONSDIR := $(shell mktemp -t -d)
install: export DISPLAY =
install: build
	dh install

	cp -a ${ICONSDIR}/ComixCursors* ${PACKAGEDIR}/${ICONDIR}

	chmod +x debian/wrapperthemes.sh
	debian/wrapperthemes.sh

.PHONY: binary-indep
binary-indep: build install
	dh binary-indep

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

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

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
#	Skip auto-detection of build tool.
	make clean

.PHONY: override_dh_auto_build
override_dh_auto_build:
#	Skip auto-detection of build tool.

.PHONY: override_dh_auto_test
override_dh_auto_test:
#	Skip auto-detection of build tool.

.PHONY: override_dh_auto_install
override_dh_auto_install:
#	Skip auto-detection of build tool.
	./install-all.sh

.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
	dh_installchangelogs ChangeLog


# Local variables:
# mode: makefile
# coding: utf-8
# End:
# vim: filetype=make fileencoding=utf-8 :
