#!/usr/bin/make -f

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

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Commands to configure the package.

	touch configure-stamp

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp: configure-stamp 
	dh_testdir

	# Commands to compile the package.
	mkdir -p build && \
		cd build && \
		cmake -DEXEC=el.x86.linux.bin -DVERSION_PREFIX=1.9.5 .. && \
		make
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Commands to clean up after the build process.
	rm -rf build

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	dh_installdocs
	dh_installexamples
	dh_install
	dh_installmenu
	dh_installman pkgfiles/eternallands.6 pkgfiles/el.x86.linux.bin.6
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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