From 8618a0f5f6d9ab2c05c14ac3b61dfe350f2c20eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Thu, 6 Jan 2022 16:12:05 -0500
Subject: [PATCH] packaging: fix snapcraft.yml and remove deprecated submodules

Change-Id: I351d4c964967340277891b7e541e37615304f80c
---
 .gitmodules                              | 12 ------------
 Jenkinsfile                              |  4 ++--
 build.py                                 |  2 +-
 client-gnome                             |  1 -
 client-uwp                               |  1 -
 lrc                                      |  1 -
 lrc-gnome                                |  1 -
 packaging/rules/snap/jami/snapcraft.yaml |  9 +++------
 8 files changed, 6 insertions(+), 25 deletions(-)
 delete mode 160000 client-gnome
 delete mode 160000 client-uwp
 delete mode 160000 lrc
 delete mode 160000 lrc-gnome

diff --git a/.gitmodules b/.gitmodules
index 368c3d59..a1d08b87 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,30 +1,18 @@
 [submodule "client-android"]
 	path = client-android
 	url = https://review.jami.net/jami-client-android
-[submodule "client-gnome"]
-	path = client-gnome
-	url = https://review.jami.net/jami-client-gnome
 [submodule "daemon"]
 	path = daemon
 	url = https://review.jami.net/jami-daemon
-[submodule "lrc"]
-	path = lrc
-	url = https://review.jami.net/jami-libclient
 [submodule "client-macosx"]
 	path = client-macosx
 	url = https://review.jami.net/jami-client-macos
 [submodule "client-ios"]
 	path = client-ios
 	url = https://review.jami.net/jami-client-ios
-[submodule "client-uwp"]
-	path = client-uwp
-	url = https://review.jami.net/jami-client-uwp
 [submodule "client-qt"]
 	path = client-qt
 	url = https://review.jami.net/jami-client-qt
 [submodule "plugins"]
 	path = plugins
 	url = https://review.jami.net/jami-plugins
-[submodule "lrc-gnome"]
-	path = lrc-gnome
-	url = https://review.jami.net/jami-libclient
diff --git a/Jenkinsfile b/Jenkinsfile
index b377394b..b0d0750e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -32,7 +32,7 @@
 // - Allow publishing from any node, to avoid relying on a single machine.
 
 // Configuration globals.
-def SUBMODULES = ['daemon', 'lrc', 'client-qt']
+def SUBMODULES = ['daemon', 'client-qt']
 def TARGETS = [:]
 def REMOTE_HOST = env.SSH_HOST_DL_RING_CX
 def REMOTE_BASE_DIR = '/srv/repository/ring'
@@ -138,8 +138,8 @@ See https://wiki.savoirfairelinux.com/wiki/Jenkins.jami.net#Configuration_client
                 sh """git checkout ${params.CHANNEL}
                       git reset --hard origin/${params.CHANNEL}
                       # Submodules are generally not managed by merging
-                      git merge -X theirs --no-commit FETCH_HEAD
                       git status
+                      git merge -X theirs --no-commit FETCH_HEAD
                    """
             }
         }
diff --git a/build.py b/build.py
index 918896e2..18a89489 100755
--- a/build.py
+++ b/build.py
@@ -395,7 +395,7 @@ def run_init():
     for name in module_names:
         copy_file("./scripts/commit-msg", ".git/modules/"+name+"/hooks")
 
-    module_names_to_format = ['daemon', 'lrc', 'client-qt', 'plugins']
+    module_names_to_format = ['daemon', 'client-qt', 'plugins']
     for name in module_names_to_format:
         execute_script(
             ['./scripts/format.sh --install  %(path)s'],
diff --git a/client-gnome b/client-gnome
deleted file mode 160000
index d493e44f..00000000
--- a/client-gnome
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit d493e44ff3fd106456df85d0e73f6b3c08ecd38c
diff --git a/client-uwp b/client-uwp
deleted file mode 160000
index 4b639e9a..00000000
--- a/client-uwp
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4b639e9a903931bab09292b4d93a4de6d531ae4c
diff --git a/lrc b/lrc
deleted file mode 160000
index 48db64cb..00000000
--- a/lrc
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 48db64cbcd3a8d7a12cad940694ce9239b8db576
diff --git a/lrc-gnome b/lrc-gnome
deleted file mode 160000
index 74fcb074..00000000
--- a/lrc-gnome
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 74fcb074357421dad30181ee5b46cebd79166ca9
diff --git a/packaging/rules/snap/jami/snapcraft.yaml b/packaging/rules/snap/jami/snapcraft.yaml
index 0fc789f6..7a5f7806 100644
--- a/packaging/rules/snap/jami/snapcraft.yaml
+++ b/packaging/rules/snap/jami/snapcraft.yaml
@@ -243,8 +243,6 @@ parts:
       - -usr/share/doc/libldap-common/changelog.Debian.gz
     build-environment:
       - QT_BASE_DIR: "/usr/lib/libqt-jami"
-      - QTDIR: "$QT_BASE_DIR"
-      - QTVER: "6.2.0"
       - PATH: "$QT_BASE_DIR/bin:$PATH"
       - LD_LIBRARY_PATH: "$QT_BASE_DIR/lib:$LD_LIBRARY_PATH"
       - PKG_CONFIG_PATH: "$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH"
@@ -286,11 +284,10 @@ parts:
       cd $SNAPCRAFT_PART_BUILD/client-qt
       mkdir build
       cd build
-      cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-               -DCMAKE_PREFIX_PATH=$SNAPCRAFT_PART_INSTALL/usr \
-               -DENABLE_STATIC=true -DENABLE_LIBWRAP=true \ \
+      cmake .. -DENABLE_LIBWRAP=true \
                -DLIBJAMI_BUILD_DIR=$SNAPCRAFT_PART_BUILD/daemon/src \
-               -DQT6_VER=$QTVER -DQT6_PATH=$QTDIR
+               -DCMAKE_INSTALL_PREFIX=/usr \
+               -DCMAKE_BUILD_TYPE=Release
       make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
       DESTDIR=$SNAPCRAFT_PART_INSTALL make install
     build-packages:
-- 
GitLab