From 519e16a35b0cce95da99af5d97408d4e263df8e3 Mon Sep 17 00:00:00 2001
From: Amin Bandali <amin.bandali@savoirfairelinux.com>
Date: Thu, 17 Mar 2022 15:28:47 -0400
Subject: [PATCH] packaging: use system libarchive on Debian 10

The bundled one from the daemon contribs does not build on Debian 10
for some reason.

Change-Id: Id6fbc1e09bdf2912663f78502b255e975aebec1a
---
 docker/Dockerfile_debian_10  | 1 +
 packaging/rules/debian/rules | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/docker/Dockerfile_debian_10 b/docker/Dockerfile_debian_10
index c07e18dc..469a0c5c 100644
--- a/docker/Dockerfile_debian_10
+++ b/docker/Dockerfile_debian_10
@@ -12,6 +12,7 @@ RUN apt-get install -y -o Acquire::Retries=10 \
         g++-8 \
         clang \
         clang-tools \
+        libarchive-dev \
         wget
 
 ADD scripts/prebuild-package-debian.sh /opt/prebuild-package-debian.sh
diff --git a/packaging/rules/debian/rules b/packaging/rules/debian/rules
index 766589a6..0d5893c1 100755
--- a/packaging/rules/debian/rules
+++ b/packaging/rules/debian/rules
@@ -31,6 +31,10 @@ JAMI_DAEMON_PKG_NAME="jami-daemon"
 
 # Bundled packages from contrib
 BUNDLED_PKGS=""
+ifeq (debian_10,$(findstring debian_10, $(DISTRIBUTION)))
+# Daemon's bundled libarchive does not build on Debian 10
+BUNDLED_PKGS="--disable-libarchive"
+endif
 ifeq (raspbian_10_armhf,$(findstring raspbian_10_armhf, $(DISTRIBUTION)))
 # Raspbian's yaml-cpp lib does not work properly
 BUNDLED_PKGS="--enable-ffmpeg --enable-yaml-cpp"
-- 
GitLab