#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

# Upstream unconditionally sets CMAKE_INSTALL_RPATH. Make it ineffective by
# setting CMAKE_SKIP_RPATH
override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_SKIP_RPATH=ON \
		-DENABLE_ROOTCA_DOWNLOAD=NO \
		-DENABLE_ADVANCED_IM=NO \
		-DENABLE_LIME=NO \
		-DENABLE_LIME_X3DH=NO \
		-DENABLE_DB_STORAGE=NO \
		-DENABLE_UNIT_TESTS=NO \
		-DENABLE_STATIC=NO \
		$(CONFIGURE_ARGS)

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_strip:
	dh_strip --dbgsym-migration='linphone-dbg (<< 3.12.0-1~)'
