#!/usr/bin/make -f

configure: Local.mak

Local.mak:
	dh_testdir
	LDFLAGS=-Bsymbolic-functions docdir=/usr/share/doc/xca prefix=/usr ./configure

build: build-stamp

build-stamp: Local.mak
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	$(MAKE) distclean
	rm -f conftest.c
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) destdir=$(CURDIR)/debian/xca/ install
	rm -rf $(CURDIR)/debian/xca/usr/man

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs changelog
	dh_installdocs AUTHORS VERSION
	dh_install
	dh_installmenu
	dh_installman
	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
