#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

override_dh_auto_configure:
	./Configure \
		-ders \
		-Dprefix=/usr \
		-Dprivlib=/usr/share/gtk-gnutella \
		-Darchlib=/usr/lib/$(DEB_HOST_MULTIARCH)/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/
	# Also install the manpage
	$(MAKE) install.man INSTALL_PREFIX=$(CURDIR)/debian/gtk-gnutella/

%:
	dh $@
