#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

GNOME_MODULE := libsoup

DEB_DH_MAKESHLIBS_ARGS_ALL += -V -- -c4

DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc \
        --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

# The test-suite currently fails on various architectures
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663056
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643906

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
CHECK_HOME = $(CURDIR)/debian/tmp/home
common-build-arch common-build-indep:: debian/stamp-makefile-check
debian/stamp-makefile-check: debian/stamp-makefile-build
	mkdir -p $(CHECK_HOME)
ifeq ($(DEB_HOST_ARCH_OS),linux)
	env HOME=$(CHECK_HOME) XDG_RUNTIME_DIR=$(CHECK_HOME) xvfb-run -s -noreset $(MAKE) check
endif
	touch $@

makefile-clean::
	rm -f debian/stamp-makefile-check
endif

