#!/usr/bin/make -f
# -*- makefile -*-
#
# debian/rules file for package 'gcov'
#

export LC_ALL=C
export DH_COMPAT=4

PACKAGE:=ggcov
# VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | sed 's/^Version: *//')
VERSION:=0.3

TAR_DIR=$(PACKAGE)-$(VERSION)
# The DBS rules
include /usr/share/dbs/dbs-build.mk
# convenient way to set architecture specification strings
# the ifeq condition is here to allow them to be overridden
# from the command line
ifeq (,$(DEB_BUILD_GNU_TYPE))
 include /usr/share/dbs/dpkg-arch.mk
endif
build-stamp=$(STAMP_DIR)/build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -rf $(SOURCE_DIR) $(STAMP_DIR) *.log debian/*~
	dh_clean

build-stamp build: ${patched}
	dh_testdir
	(cd $(BUILD_TREE) ; CCC=g++  ./configure --prefix=/usr --mandir=/usr/share/man )
	$(MAKE) -C $(BUILD_TREE)
	touch $(build-stamp)

binary: binary-arch binary-indep

binary-indep:

binary-arch:
	dh_testdir
	dh_testroot
	$(MAKE) -C $(BUILD_TREE) DESTDIR=../../../debian/ggcov install 
	dh_installdocs $(BUILD_TREE)/README
	dh_installchangelogs $(BUILD_TREE)/ChangeLog
	dh_strip
	dh_installexamples
	dh_makeshlibs
	dh_shlibdeps
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

