#!/usr/bin/make -f
# debian/rules file for qvocab
# Copyright 2000 by Thomas Schultz
# based on: Sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

#export DH_VERBOSE=1

clean:
	dh_testdir
	dh_clean
	rm -f build
	-$(MAKE) -i distclean
	rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars

install:
	dh_clean
	dh_installdirs
	$(MAKE) CFLAGS=-O2 LDFLAGS=-s INSTALL_PROGRAM='install -c -s' \
		prefix=`pwd`/debian/tmp/usr install

build: 
	./configure --prefix=/usr --mandir=/usr/share/man --enable-converters
	$(MAKE) CFLAGS=-O2 LDFLAGS=
	touch build

binary-arch: install
	dh_testdir -a
	dh_installdocs -a COPYING NEWS TODO README README.CONVERT README.MYSQL
	dh_installmanpages -a
	dh_installchangelogs -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary:		binary-arch

.PHONY: binary binary-arch clean checkroot
