packaging: debian: use cross compilation for armhf platforms

Using qemu in user mode to build jami package for raspbian platforms
adds a lot of overhead.

Remove the virtualization using the Debian 10 cross-compiling toolchain.
The target platform (i.e. the platform on which the package will be
installed) has to be set and some compilation options has to be added in
the debian/rules file.

Also add the armhf architecture in the Docker container in order to
install the package dependencies for this platform.

Change-Id: Ic2282ad9377d52482bca4a4f0ef017fbcc1f8eb7
diff --git a/packaging/rules/debian/rules b/packaging/rules/debian/rules
index ba6d33a..eeb1965 100755
--- a/packaging/rules/debian/rules
+++ b/packaging/rules/debian/rules
@@ -19,9 +19,15 @@
 
 # Bundled packages from contrib
 BUNDLED_PKGS = .ffmpeg
-ifeq ($(DISTRIBUTION),raspbian_10_armhf)
+ifeq (raspbian_10_armhf,$(findstring raspbian_10_armhf, $(DISTRIBUTION)))
 # Raspbian's yaml-cpp lib does not work properly
 BUNDLED_PKGS += .yaml-cpp
+# Add host environment variables
+CMAKE_OPTIONS=-DCHOST=${HOST_ARCH} \
+		-DCMAKE_C_COMPILER=${HOST_ARCH}-gcc \
+		-DCMAKE_CXX_COMPILER=${HOST_ARCH}-g++ \
+		-DCMAKE_FIND_ROOT_PATH=/usr/${HOST_ARCH} \
+		-DPKG_CONFIG_EXECUTABLE=/usr/bin/${HOST_ARCH}-pkg-config
 endif
 
 %:
@@ -46,6 +52,7 @@
 	mkdir -p daemon/contrib/native
 	cd daemon/contrib/native && \
         ../bootstrap \
+				--host=${HOST_ARCH} \
 				--disable-downloads \
 				--no-checksums \
 				--disable-ogg \
@@ -65,7 +72,8 @@
 		./autogen.sh && \
 		./configure \
 				--prefix=/usr \
-				--disable-shared
+				--disable-shared \
+				--host=${HOST_ARCH}
 
 	#############################
 	## libringclient configure ##
@@ -77,6 +85,7 @@
 			-DRING_BUILD_DIR=$(CURDIR)/daemon/src \
 			-DCMAKE_INSTALL_PREFIX=/usr \
 			-DCMAKE_BUILD_TYPE=Debug \
+			$(CMAKE_OPTIONS) \
 			..
 
 	############################
@@ -89,6 +98,7 @@
 			-DCMAKE_INSTALL_PREFIX=/usr \
 			-DLibRingClient_PROJECT_DIR=/$(CURDIR)/lrc \
 			-DGSETTINGS_LOCALCOMPILE=OFF \
+			$(CMAKE_OPTIONS) \
 			..
 
 	dh_auto_configure