diff --git a/.gitmodules b/.gitmodules index a2a8a724eceda94f0d4690cbf21b832cfd308de3..368c3d590b7814a2dd784bf3dfc5412e98274521 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [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 5db8a85b8b8840b930e74b78e82ea5b5ed088f0f..ce870dbb80e159729cf9a1d0c5cc93d0e82eef2c 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-gnome', 'client-qt'] +def SUBMODULES = ['daemon', 'lrc', 'lrc-gnome', 'client-gnome', 'client-qt'] def TARGETS = [:] def REMOTE_HOST = env.SSH_HOST_DL_RING_CX def REMOTE_BASE_DIR = '/srv/repository/ring' diff --git a/Makefile b/Makefile index f56a03677dd89267482a067561b0d1bdbb223f38..59a7600328ac64ccd5a473ad9a243272529f84f3 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ $(RELEASE_TARBALL_FILENAME): tarballs.manifest rm -f "$@" mkdir $(TMPDIR)/jami-project git archive HEAD | tar xf - -C $(TMPDIR)/jami-project - for m in daemon lrc client-gnome client-qt; do \ + for m in daemon lrc lrc-gnome client-gnome client-qt; do \ (cd "$$m" && git archive --prefix "$$m/" HEAD \ | tar xf - -C $(TMPDIR)/jami-project); \ done diff --git a/lrc-gnome b/lrc-gnome new file mode 160000 index 0000000000000000000000000000000000000000..74fcb074357421dad30181ee5b46cebd79166ca9 --- /dev/null +++ b/lrc-gnome @@ -0,0 +1 @@ +Subproject commit 74fcb074357421dad30181ee5b46cebd79166ca9 diff --git a/packaging/rules/debian/control b/packaging/rules/debian/control index 8b7ef62a38feefc9cfa0e4608e5cbe0bf2a4a679..f8219c37711c305add456b6bf414cba738c4d7c9 100644 --- a/packaging/rules/debian/control +++ b/packaging/rules/debian/control @@ -80,6 +80,7 @@ Replaces: jami, libqt-jami (>= 6.2.3), Conflicts: jami, jami-libclient, + jami-libclient-gnome, jami-daemon, jami-gnome, libqt-jami @@ -108,7 +109,7 @@ Package: jami-gnome Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - jami-libclient (=${binary:Version}) + jami-libclient-gnome (=${binary:Version}) Description: Secure and distributed voice, video and chat platform - desktop client Jami (jami.net) is a secure and distributed voice, video and chat communication platform that requires no centralized server and leaves the power of privacy @@ -122,12 +123,27 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, jami-daemon (=${binary:Version}), libqt-jami (>= 6.2.3) +Conflicts: jami-libclient-gnome Description: Secure and distributed voice, video and chat platform - daemon Jami (jami.net) is a secure and distributed voice, video and chat communication platform that requires no centralized server and leaves the power of privacy in the hands of the user. . - This package contains the Jami client library: lrc. + This package contains the Jami client library, lrc, for the Qt client. + +Package: jami-libclient-gnome +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + jami-daemon (=${binary:Version}), + libqt-jami (>= 6.2.3) +Conflicts: jami-libclient +Description: Secure and distributed voice, video and chat platform - daemon + Jami (jami.net) is a secure and distributed voice, video and chat communication + platform that requires no centralized server and leaves the power of privacy + in the hands of the user. + . + This package contains the Jami client library, lrc, for the GNOME client. Package: jami-daemon Architecture: any diff --git a/packaging/rules/debian/rules b/packaging/rules/debian/rules index c685213970761836b597d15a63a2f01a97e0fbd5..766589a663a6d0d4338914895848adb6b48020d3 100755 --- a/packaging/rules/debian/rules +++ b/packaging/rules/debian/rules @@ -26,6 +26,7 @@ JAMI_ALL_IN_ONE_PKG_NAME="jami-all" JAMI_CLIENT_PKG_NAME="jami" JAMI_CLIENT_GNOME_PKG_NAME="jami-gnome" JAMI_LIB_CLIENT_PKG_NAME="jami-libclient" +JAMI_LIB_CLIENT_GNOME_PKG_NAME="jami-libclient-gnome" JAMI_DAEMON_PKG_NAME="jami-daemon" # Bundled packages from contrib @@ -100,20 +101,36 @@ override_dh_auto_build: -DCMAKE_INSTALL_LIBDIR=lib \ $(CMAKE_OPTIONS) .. + # Libringclient configure (for GNOME client) + cd lrc-gnome && \ + mkdir build && \ + cd build && \ + cmake \ + -DRING_BUILD_DIR=$(CURDIR)/daemon/src \ + -DENABLE_LIBWRAP=true \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + $(CMAKE_OPTIONS) .. + # libringclient build make -C lrc/build -j$(NO_CPUS) V=1 + # libringclient build (for GNOME client) + make -C lrc-gnome/build -j$(NO_CPUS) V=1 + # GNOME client configure cd client-gnome && \ mkdir build && \ cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DLibRingClient_PROJECT_DIR=/$(CURDIR)/lrc \ + -DLibRingClient_PROJECT_DIR=/$(CURDIR)/lrc-gnome \ -DGSETTINGS_LOCALCOMPILE=OFF \ $(CMAKE_OPTIONS) .. # GNOME client build + cd client-gnome/web && \ + for f in ../../lrc-gnome/src/web-chatview/*.*; do ln -sf "$$f" .; done make -C client-gnome/build LDFLAGS="-lpthread" -j$(NO_CPUS) V=1 # Qt client configure and build @@ -141,6 +158,8 @@ override_dh_auto_clean: # CMake build system has no distclean target, so use clean. [ -f lrc/build/Makefile ] && make -C lrc/build clean || true rm -rfv lrc/build + [ -f lrc-gnome/build/Makefile ] && make -C lrc-gnome/build clean || true + rm -rfv lrc-gnome/build ########################### ##### gnome client clean ## @@ -172,9 +191,13 @@ override_dh_auto_install: ## LibRingClient cd lrc/build && make DESTDIR=$(CURDIR)/debian/$(JAMI_LIB_CLIENT_PKG_NAME) install rm -rfv $(CURDIR)/debian/$(JAMI_LIB_CLIENT_PKG_NAME)/usr/include + ## LibRingClient (for GNOME client) + cd lrc-gnome/build && make DESTDIR=$(CURDIR)/debian/$(JAMI_LIB_CLIENT_GNOME_PKG_NAME) install + rm -rfv $(CURDIR)/debian/$(JAMI_LIB_CLIENT_GNOME_PKG_NAME)/usr/include # This is a symlink, should be in -dev package rm -v $(CURDIR)/debian/$(JAMI_LIB_CLIENT_PKG_NAME)/usr/lib/libringclient.so + rm -v $(CURDIR)/debian/$(JAMI_LIB_CLIENT_GNOME_PKG_NAME)/usr/lib/libringclient.so # cmake files rm -rfv $(CURDIR)/debian/$(JAMI_CLIENT_PKG_NAME)/usr/lib/cmake diff --git a/packaging/rules/rpm/jami-gnome.spec b/packaging/rules/rpm/jami-gnome.spec index b7b3f8c1a75ddfc5551e3050b8984ba38bad466c..4f9f7284ffe947c3a8c4a18a708ccbfe445d1741 100644 --- a/packaging/rules/rpm/jami-gnome.spec +++ b/packaging/rules/rpm/jami-gnome.spec @@ -11,7 +11,7 @@ License: GPLv3+ Vendor: Savoir-faire Linux URL: https://jami.net/ Source: jami_%{version}.tar.gz -Requires: jami-libclient = %{version} +Requires: jami-libclient-gnome = %{version} # Build dependencies. BuildRequires: make diff --git a/packaging/rules/rpm/jami-libclient-gnome.spec b/packaging/rules/rpm/jami-libclient-gnome.spec new file mode 100644 index 0000000000000000000000000000000000000000..91dd86550dab8c07db2235d75c8abb99dd68d526 --- /dev/null +++ b/packaging/rules/rpm/jami-libclient-gnome.spec @@ -0,0 +1,71 @@ +%define name jami-libclient-gnome +%define version RELEASE_VERSION +%define release 0 + +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Summary: Client library for Jami GNOME +Group: Applications/Internet +License: GPLv3+ +Vendor: Savoir-faire Linux +URL: https://jami.net/ +Source: jami_%{version}.tar.gz +Requires: jami-daemon = %{version} + +# Build dependencies +BuildRequires: jami-daemon-devel = %{version} +Requires: jami-libqt +BuildRequires: make +%if 0%{?fedora} >= 32 +BuildRequires: NetworkManager-libnm-devel +BuildRequires: cmake +BuildRequires: gcc-c++ +%endif + +%description +This package contains the client library of Jami GNOME, a free +software for universal communication which respects freedoms and +privacy of its users. + +%prep +%setup -n jami-project + +%build +# Qt-related variables +cd %{_builddir}/jami-project/lrc-gnome && \ + mkdir build && cd build && \ + cmake -DRING_BUILD_DIR=%{_builddir}/jami-project/daemon/src \ + -DENABLE_LIBWRAP=true \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DCMAKE_BUILD_TYPE=Release \ + .. +make -C %{_builddir}/jami-project/lrc-gnome/build %{_smp_mflags} V=1 + +%install +DESTDIR=%{buildroot} make -C lrc-gnome/build install + +%files +%defattr(-,root,root,-) +%{_libdir}/libringclient.so.1.0.0 +%{_datadir}/libringclient + +%package devel +Summary: Development files of the Jami GNOME client library + +%description devel +This package contains the header files and the unversioned shared +library for developing with the Jami client library. + +%files devel +%{_includedir}/libringclient +%{_libdir}/cmake/LibRingClient +# The following is a symbolic link. +%{_libdir}/libringclient.so + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig diff --git a/scripts/build-package-rpm.sh b/scripts/build-package-rpm.sh index e4212289b1f5993361b1e606742bcdbe3ad91e1c..82644546019b99be898e489f31ba937e1f28e3fb 100755 --- a/scripts/build-package-rpm.sh +++ b/scripts/build-package-rpm.sh @@ -127,12 +127,16 @@ rpmdev-bumpspec --comment="Automatic nightly release" \ rpmbuild --define "debug_package %{nil}" -ba jami-daemon.spec rpm --install /root/rpmbuild/RPMS/x86_64/jami-daemon-* -# Build the client library and install it. +# Build the client library, install it, and build the Qt client. rpmbuild --define "debug_package %{nil}" -ba jami-libclient.spec rpm --install /root/rpmbuild/RPMS/x86_64/jami-libclient-* - -# Build the GNOME and Qt clients. rpmbuild --define "debug_package %{nil}" -ba jami-qt.spec + +# Uninstall the client library, build and install the client library +# version specific to the GNOME client, and build the GNOME client. +rpm --erase $(rpm --query --all 'jami-libclient*') +rpmbuild --define "debug_package %{nil}" -ba jami-libclient-gnome.spec +rpm --install /root/rpmbuild/RPMS/x86_64/jami-libclient-gnome-* rpmbuild --define "debug_package %{nil}" -ba jami-gnome.spec # Move the built packages to the output directory.