#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# This has to be exported to make some magic below work.

# shared library versions, option 1
version=0.0
major=0


build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp:
	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
	$(MAKE)
	$(MAKE) data
	touch build-stamp

clean:
	rm -f build-stamp 
	[ ! -f "Makefile" ] || $(MAKE) distclean
	dh_clean

install: build
	dh_prep
	dh_installdirs
	$(MAKE) install prefix=`pwd`/debian/unicon-imc2/usr DESTDIR=`pwd`/debian/unicon-imc2/usr
	$(MAKE) data-install prefix=`pwd`/debian/unicon-imc2/usr 
	cp -f debian/unicon-imc2.override `pwd`/debian/unicon-imc2/usr/share/lintian/overrides/unicon-imc2

binary-indep: build install

binary-arch: build install
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installcron
	dh_installinfo
	dh_installchangelogs ChangeLog
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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