#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# 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 dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

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

# This has to be exported to make some magic below work.
export DH_OPTIONS


%:
	dh  $@

override_dh_auto_configure:
	dh_auto_configure -- --bindir=/usr/games --datadir=/usr/share/games

override_dh_strip:
	# Create -dbg package with debug symbols for gdb
	dh_strip --dbg-package=cytadela-dbg

override_dh_install:
	# Don't install docs in the datadir (cf. dh_installdocs)
	dh_install -Xcytadela/doc/

override_dh_installdocs:
	# Group all documentation in the -data arch-indep package
	dh_installdocs --link-doc=cytadela-data
# dh_listpackages uses DH_INTERNAL_OPTIONS that is set to '-a'/'-i'/''
ifneq (,$(findstring cytadela-data, $(shell dh_listpackages)))
	# lintian extra-license-file
	rm debian/cytadela-data/usr/share/doc/cytadela-data/COPYING
	rm debian/cytadela-data/usr/share/doc/cytadela-data/GNUFDL
endif
