#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

ifeq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
export CFLAGS += -O2
else
export CFLAGS = -g
endif


TARGET=`pwd`/debian/boot-icons

build:
	#
	# Building...
	#
	dh_testdir
	$(MAKE)

clean:
	#
	# Cleaning...
	#
	dh_testdir
	dh_testroot

	-$(MAKE) distclean

	dh_clean

install: build
	#
	# Installing...
	#
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install DESTDIR=$(TARGET) mandir=/usr/share/man


# 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
	#
	# Packaging...
	#
	dh_testdir
	dh_testroot

	dh_install
	dh_installdocs debian/README
	dh_installchangelogs
	dh_installman

	dh_installinit -r --no-start --name=progress.kernel -- start 05 S .
	dh_installinit -r --no-start --name=progress.mount -- start 35 S .
	dh_installinit -r --no-start --name=progress.network -- start 45 S .
	dh_installinit -r --no-start --name=progress.service -- \
					start 19 2 3 4 5 .
	dh_installinit -r --no-start --name=progress.up -- \
					start 25 2 3 4 5 .

	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
