#!/usr/bin/make -f

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

include /usr/share/dpkg/architecture.mk

CFLAGS = -Wall -g
# Avoid embedding build path in binaries
CFLAGS += -ffile-prefix-map=$(CURDIR)=.

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- CFLAGS="$(CFLAGS)" jnettop_LDADD='$$(LDADD) $$(GLIB_LIBS)'
	#/usr/bin/docbook-to-man debian/jnettop.sgml > jnettop.1

override_dh_auto_install:
	dh_auto_install
	mv $(CURDIR)/debian/jnettop/usr/bin $(CURDIR)/debian/jnettop/usr/sbin
	install -D $(CURDIR)/.jnettop \
		$(CURDIR)/debian/jnettop/usr/share/doc/jnettop/dot.jnettop
