Skip to content
Snippets Groups Projects
Commit bd745f43 authored by Amin Bandali's avatar Amin Bandali Committed by Adrien Béraud
Browse files

packaging: Adapt to client-qt vendoring libjamiclient.

For both deb and rpm make jami-libclient a transitional package that
does not have any dependencies and that the user can safely remove.
The jami-libclient package can then be dropped later into the future;
perhaps in a year or so from now.

Change-Id: I53d7cb89a40282acec7b4b0aa7930b1a52835a1b
parent fcc8fb57
No related branches found
No related tags found
No related merge requests found
......@@ -83,10 +83,12 @@ Package: jami
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
jami-libclient (=${binary:Version}),
jami-daemon (=${binary:Version}),
libqt-jami (>= 6.2.3)
Provides: jami-qt
Replaces: jami-all
Replaces: jami-all,
jami-libclient (<= 20220516.0214.9b42ad3~dfsg1-1)
Breaks: jami-libclient (<= 20220516.0214.9b42ad3~dfsg1-1)
Conflicts: jami-all
Description: Secure and distributed voice, video and chat platform - desktop client
Jami (jami.net) is a secure and distributed voice, video and chat communication
......@@ -95,19 +97,15 @@ Description: Secure and distributed voice, video and chat platform - desktop cli
.
This package contains the jami-qt desktop client.
# Made into a transitional package on 2022-06-21, after libjamiclient
# was merged into src/libclient under jami-client-qt.git, to provide
# an upgrade path to existing users. Feel free to remove this package
# later into the future, some time after 2023-06-21 perhaps.
Package: jami-libclient
Architecture: any
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, for the Qt client.
Description: transitional package for jami
This is a transitional package. Jami libclient has been merged into
the jami-qt client code-base, and this package can be safely removed.
Package: jami-daemon
Architecture: any
......
......@@ -24,7 +24,6 @@ endif
# Binary package names
JAMI_ALL_IN_ONE_PKG_NAME="jami-all"
JAMI_CLIENT_PKG_NAME="jami"
JAMI_LIB_CLIENT_PKG_NAME="jami-libclient"
JAMI_DAEMON_PKG_NAME="jami-daemon"
# Bundled packages from contrib
......@@ -96,76 +95,37 @@ override_dh_auto_build:
make -C daemon -j$(NO_CPUS) V=1
pod2man daemon/man/jamid.pod > daemon/jamid.1
# Libringclient configure
cd lrc && \
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
# Qt client configure and build
cd client-qt && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLRC=$(CURDIR)/lrc \
-DLIBJAMI_BUILD_DIR=$(CURDIR)/daemon/src \
-DENABLE_LIBWRAP=true \
$(CMAKE_OPTIONS) ..
make -C client-qt/build -j$(NO_CPUS) V=1
override_dh_auto_clean:
#######################
## Daemon clean ##
#######################
# Daemon clean
[ -f daemon/contrib/native/Makefile ] && \
make -C daemon/contrib/native distclean || true
rm -rfv daemon/contrib/native
rm -rfv daemon/jamid.1
#########################
## libringclient 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
#####################
## qt client clean ##
#####################
# Qt client clean
# CMake build system has no distclean target, so use clean.
[ -f client-qt/build/Makefile ] && make -C client-qt/build clean || true
rm -rfv client-qt/build
override_dh_auto_install:
#########################
## Daemon install ##
#########################
# Daemon install
cd daemon && make DESTDIR=$(CURDIR)/debian/$(JAMI_DAEMON_PKG_NAME) install
rm -rfv $(CURDIR)/debian/$(JAMI_DAEMON_PKG_NAME)/usr/include
rm -rfv $(CURDIR)/debian/$(JAMI_DAEMON_PKG_NAME)/usr/lib/*.a
rm -rfv $(CURDIR)/debian/$(JAMI_DAEMON_PKG_NAME)/usr/lib/*.la
#########################
## Jami client 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
# This is a symlink, should be in -dev package
rm -v $(CURDIR)/debian/$(JAMI_LIB_CLIENT_PKG_NAME)/usr/lib/libringclient.so
# cmake files
rm -rfv $(CURDIR)/debian/$(JAMI_CLIENT_PKG_NAME)/usr/lib/cmake
## Qt client
# Qt client install
cd client-qt/build && \
make DESTDIR=$(CURDIR)/debian/$(JAMI_CLIENT_PKG_NAME) install
......@@ -177,33 +137,18 @@ override_dh_auto_install:
cp "$$file_name" "$(OCI_INSTALL_DIR)$$file_name"; \
done
######################
## Jami AiO install ##
######################
## daemon
# Jami all-in-one install
# Daemon
cd daemon && make DESTDIR=$(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME) install
rm -rfv $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)/usr/include
rm -rfv $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)/usr/lib/*.a
rm -rfv $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)/usr/lib/*.la
## LibRingClient
cd lrc/build && make DESTDIR=$(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME) install
rm -rfv $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)/usr/include
# This is a symlink, should be in -dev package
rm -v $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)/usr/lib/libringclient.so
# cmake files
rm -rfv $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)/usr/lib/cmake
## Qt client
# Qt client
cd client-qt/build && \
make DESTDIR=$(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME) install
override_dh_shlibdeps:
dh_shlibdeps -- \
-x$(JAMI_ALL_IN_ONE_PKG_NAME) \
-x$(JAMI_LIB_CLIENT_PKG_NAME)
dh_shlibdeps -- -x$(JAMI_ALL_IN_ONE_PKG_NAME)
tmpdir:= $(shell mktemp -d)
workdir:= $(shell pwd)
......
# Made into a transitional package on 2022-06-21, after libjamiclient
# was merged into src/libclient under jami-client-qt.git, to provide
# an upgrade path to existing users. Feel free to remove this package
# later into the future, some time after 2023-06-21 perhaps.
%define name jami-libclient
%define version RELEASE_VERSION
%define release 0
......@@ -5,84 +10,16 @@
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Summary: Client library for Jami
Summary: Transitional package for Jami; can be safely removed
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, a free software for
universal communication which respects freedoms and privacy of its
users.
%prep
%setup -n jami-project
%build
# Configure and build bundled ffmpeg (for libavutil/avframe).
mkdir -p %{_builddir}/jami-project/daemon/contrib/native
cd %{_builddir}/jami-project/daemon/contrib/native && \
../bootstrap \
--no-checksums \
--disable-ogg \
--disable-flac \
--disable-vorbis \
--disable-vorbisenc \
--disable-speex \
--disable-sndfile \
--disable-gsm \
--disable-speexdsp \
--disable-natpmp && \
make list && \
make fetch && \
make %{_smp_mflags} V=1 .ffmpeg
# Qt-related variables
cd %{_builddir}/jami-project/lrc && \
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/build %{_smp_mflags} V=1
%install
DESTDIR=%{buildroot} make -C lrc/build install
This is a transitional package. Jami libclient has been merged into
the jami-qt client code-base, and this package can be safely removed.
# Required, otherwise no rpm is generated.
%files
%defattr(-,root,root,-)
%{_libdir}/libringclient.so.1.0.0
%{_datadir}/libringclient
%package devel
Summary: Development files of the Jami 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
......@@ -11,10 +11,11 @@ License: GPLv3+
Vendor: Savoir-faire Linux
URL: https://jami.net/
Source: jami_%{version}.tar.gz
Requires: jami-libclient = %{version}
Requires: jami-daemon = %{version}
Requires: jami-libqt
Provides: jami
Obsoletes: jami < %{version}-%{release}
Obsoletes: jami-libclient <= 20220516.0214.9b42ad3-1
# Build dependencies.
%if 0%{?fedora} >= 32
......@@ -58,7 +59,9 @@ cd %{_builddir}/jami-project/daemon/contrib/native && \
# Qt-related variables
cd %{_builddir}/jami-project/client-qt && \
mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
cmake -DENABLE_LIBWRAP=true \
-DLIBJAMI_BUILD_DIR=%{_builddir}/jami-project/daemon/src \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_BUILD_TYPE=Release \
..
......@@ -77,4 +80,4 @@ DESTDIR=%{buildroot} make -C %{_builddir}/jami-project/client-qt/build install
%{_datadir}/icons/hicolor/48x48/apps/jami.png
%{_datadir}/pixmaps/jami.xpm
%{_datadir}/metainfo/jami-qt.appdata.xml
%{_datadir}/ring/translations/*
%{_datadir}/jami/translations/*
......@@ -283,27 +283,13 @@ parts:
make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
DESTDIR=$SNAPCRAFT_PART_INSTALL make install
cd $SNAPCRAFT_PART_BUILD/lrc
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=$SNAPCRAFT_PART_INSTALL/usr \
-DENABLE_STATIC=true -DENABLE_LIBWRAP=true \
-DRING_BUILD_DIR=$SNAPCRAFT_PART_BUILD/daemon/src \
-DQT6_VER=$QTVER -DQT6_PATH=$QTDIR
make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
DESTDIR=$SNAPCRAFT_PART_INSTALL make install
sed -i "s|/usr|$SNAPCRAFT_PART_INSTALL/usr|g" $SNAPCRAFT_PART_INSTALL/usr/lib/cmake/LibRingClient/LibRingClientConfig.cmake
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 \
-DLRC=$SNAPCRAFT_PART_BUILD/lrc \
-DLRCLIB=$SNAPCRAFT_PART_INSTALL/usr/lib \
-DENABLE_STATIC=true -DENABLE_LIBWRAP=true \ \
-DLIBJAMI_BUILD_DIR=$SNAPCRAFT_PART_BUILD/daemon/src \
-DQT6_VER=$QTVER -DQT6_PATH=$QTDIR
make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
DESTDIR=$SNAPCRAFT_PART_INSTALL make install
......
......@@ -131,9 +131,10 @@ 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, install it, and build the Qt client.
# Build the transitional libclient package.
rpmbuild --define "debug_package %{nil}" -ba jami-libclient.spec
rpm --install /root/rpmbuild/RPMS/x86_64/jami-libclient-*
# Build the Qt client.
rpmbuild --define "debug_package %{nil}" -ba jami-qt.spec
# Move the built packages to the output directory.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment