#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
export BUILDDIR = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)

# needed for Ubuntu
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dunicode_support=icu \
		-Dstemmer=enabled \
		-Ddocs=true \
		-Dbash_completion=true \
		-Dbash_completion_dir=/usr/share/bash-completion/completions \
		-Dsoup=soup2 \
		-Dsystemd_user_services=true \
		-Dsystemd_user_services_dir=/usr/lib/systemd/user

# Enforce tight shlibs dependencies
override_dh_makeshlibs:
	dh_makeshlibs -V -X/usr/lib/$(DEB_HOST_MULTIARCH)/tracker-3.0/ -- -c4

override_dh_auto_test:
	dbus-run-session -- dh_auto_test --no-parallel || true
