#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for qpidd that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

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

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CXXFLAGS += -Wno-error=cast-qual -Wno-error=cast-align
LDFLAGS += -L$(CURDIR)/src/.libs
export LDFLAGS CXXFLAGS

# Set install ruby locations for configure
export RUBY_LIB = $(shell ruby1.8 -r rbconfig -e 'print Config::CONFIG["rubylibdir"]' | sed 's,/ruby/,/ruby/vendor_ruby/,')
export RUBY_LIB_ARCH = $(shell ruby1.8 -r rbconfig -e 'print Config::CONFIG["archdir"]' | sed 's,/ruby/,/ruby/vendor_ruby/,')

override_dh_auto_configure:
	dh_auto_configure -- --with-sasl --with-xml --with-rdma --with-ssl --with-swig --libexecdir='/usr/lib' --enable-fast-install

override_dh_auto_test:

%:
	dh  $@ --with python2 --with autoreconf
