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

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

build: build-stamp

build-stamp:
	dh_testdir
	$(MAKE) LOCALBIN=/usr/bin LOCALMAN=/usr/man \
	GDLIB=-lgd GDINC=/usr/include
	touch build-stamp

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

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs usr/bin usr/man/man1 usr/share/doc
#	install -m 644 
	$(MAKE) CFLAGS=-O2 LDFLAGS=-s INSTALL_PROGRAM='install -c -s' \
	LOCALBIN=debian/tmp/usr/bin \
	LOCALMAN=debian/tmp/usr/man/man1 \
	GDLIB=debian/tmp/usr/lib/libgd.so.1 \
	COMPRESS=gzip \
	GDINC=debian/tmp/usr/include install			
#	install -m 644 source target
	dh_installdocs README http-analyze.ps CHANGES
	dh_installchangelogs
	dh_installexamples sample.conf
	dh_installmanpages 
	dh_strip
	dh_compress
	dh_installdeb
	dh_fixperms
	dh_shlibdeps http_analyze
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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