#!/usr/bin/make -f

include /usr/share/quilt/quilt.make

DEB_HOST_MULTIARCH ?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_configure:
	./Configure \
		-ders \
		-Dprefix=/usr \
		-Dprivlib=/usr/share/gtk-gnutella \
		-Dyacc=bison \
		-Dipv6=true \
		-Dgtkversion=2 \
		-Dofficial=true \
		-Dlibpth="/lib/$(DEB_HOST_MULTIARCH) /lib /usr/lib/$(DEB_HOST_MULTIARCH) /usr/lib"

override_dh_auto_install:
	$(MAKE) install INSTALL_PREFIX=$(CURDIR)/debian/gtk-gnutella/

build: build-stamp
build-stamp: $(QUILT_STAMPFN)
	dh build
	touch build-stamp

clean: unpatch
	dh clean

install: build
install-stamp: patch-stamp
	dh install

binary-arch: install
	dh binary-arch

binary-indep: install
	dh binary-indep

binary: binary-arch binary-indep

