#!/usr/bin/make -f
# Rules for building of shfs Package
# stolen from ywho (c) 1999 Martin Mares, mj at ucw.cz

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

export DH_OPTIONS

build: build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	$(MAKE) clean
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/tmp.
	$(MAKE) ROOT=`pwd`/debian/tmp/ MAN_PAGE_DIR= HTML_DOC_DIR= module-install
	$(MAKE) ROOT=`pwd`/debian/shfs-utils/ MAN_PAGE_DIR= HTML_DOC_DIR= utils-install

	dh_install

binary-common: build
	dh_testdir
	dh_testroot
	dh_installdocs -Xfaq.in -Xindex.in -Xinstall.in -Xinternals.in -XCVS
#	dh_installexamples
#	dh_installmenu
#	dh_installinit
#	dh_installcron
#	dh_installmanpages
	dh_installman
#	dh_undocumented
	dh_installchangelogs
	dh_strip
#	dh_compress
	dh_fixperms
#	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_md5sums
	dh_builddeb

binary-indep: build install

binary-arch: build install
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

binary-%: build install
	make -f debian/rules binary-common DH_OPTIONS=-p$*

binary: binary-indep binary-arch

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