#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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


build-arch:
#	nothing to do

build-indep: build-indep-stamp
build-indep-stamp:
	dh_testdir

#	$(MAKE)

	mkdir build
	cd build && debiandoc2html -lC ../doc/developers.sgml
	cd build && debiandoc2html -lC ../doc/defoma-script.sgml
	cd build && debiandoc2text -lC ../doc/developers.sgml
	cd build && debiandoc2text -lC ../doc/defoma-script.sgml

	touch build-indep-stamp

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

	-$(MAKE) clean

	find -type f -name "*~" | xargs rm -f
	-rm -fr build

	dh_clean

install: build-indep
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	dh_install
	chmod +x $(CURDIR)/debian/defoma/usr/share/defoma/defoma-test.sh


# Build architecture-independent files here.
binary-indep: DH_OPTIONS=-i
binary-indep: install
	dh_testdir
	dh_testroot
	dh_installdebconf	
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
#	dh_installcron
	dh_installman
#	dh_installinfo
#	dh_undocumented
	dh_installchangelogs 
	dh_link
	dh_compress
	dh_fixperms
#	You may want to make some executables suid here.
#	dh_suidregister
	dh_installdeb
	dh_perl
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build-arch
#	nothing to do

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