Skip to content
Snippets Groups Projects
Commit 6096e314 authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Sébastien Blin
Browse files

Build jami-libclient (LRC) with libwrap enabled.

* packaging/rules/debian/rules (override_dh_auto_configure): Move
recipes to ...
(override_dh_auto_configure_build): ... here.  This is necessary as
the LRC now must find the share library of the daemon, hence it must
be built before the LRC configuration occurs.
<-DENABLE_LIBWRAP=true>: New option when configuring the LRC.
* packaging/rules/rpm/jami-libclient.spec (%build): Likewise.
* scripts/install.sh (lrc_cmake_flags): Likewise.
(OSTYPE): Remove variable.
(sharedLib): Remove variable.  The Jami daemon shared library is
needed when dynamically linking against it when libwrap is enabled.
* packaging/rules/rpm/jami-daemon.spec (%build): Drop the --disable-shared
option.
(%files): Register the libring.so dynamic library.
* packaging/rules/debian/rules (override_dh_auto_configure): Drop the
--disable-shared option.

GitLab: jami-packaging#101
Change-Id: Id1acaaf15a0f3d561c73bf34dde48f4eaf058eed
parent 0bd1425d
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,9 @@ OCI_INSTALL_DIR = $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME) ...@@ -55,9 +55,9 @@ OCI_INSTALL_DIR = $(CURDIR)/debian/$(JAMI_ALL_IN_ONE_PKG_NAME)
dh $@ dh $@
override_dh_auto_configure: override_dh_auto_configure:
###########################
## Daemon configure ## override_dh_auto_build:
########################### # Daemon contribs build + configure
mkdir -p daemon/contrib/native mkdir -p daemon/contrib/native
cd daemon/contrib/native && \ cd daemon/contrib/native && \
../bootstrap \ ../bootstrap \
...@@ -79,64 +79,41 @@ override_dh_auto_configure: ...@@ -79,64 +79,41 @@ override_dh_auto_configure:
cd daemon && \ cd daemon && \
./autogen.sh && \ ./autogen.sh && \
./configure \ ./configure \
--disable-shared \
--prefix=/usr \ --prefix=/usr \
--host=${HOST_ARCH} --host=${HOST_ARCH}
############################# # Daemon build
## libringclient configure ## make -C daemon -j$(NO_CPUS) V=1
############################# pod2man daemon/man/jamid.pod > daemon/jamid.1
# Libringclient configure
cd lrc && \ cd lrc && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake \ cmake \
-DRING_BUILD_DIR=$(CURDIR)/daemon/src \ -DRING_BUILD_DIR=$(CURDIR)/daemon/src \
-DENABLE_LIBWRAP=false \ -DENABLE_LIBWRAP=true \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_LIBDIR=lib \
$(CMAKE_OPTIONS) .. $(CMAKE_OPTIONS) ..
############################ # libringclient build
## gnome client configure ##
############################
cd client-gnome && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DLibRingClient_PROJECT_DIR=/$(CURDIR)/lrc \
-DGSETTINGS_LOCALCOMPILE=OFF \
$(CMAKE_OPTIONS) \
..
#########################
## qt client configure ##
#########################
# needs to be done after lrc is built; see below
dh_auto_configure
override_dh_auto_build:
#######################
## Daemon build ##
#######################
make -C daemon -j$(NO_CPUS) V=1
pod2man daemon/man/jamid.pod > daemon/jamid.1
#########################
## libringclient build ##
#########################
make -C lrc/build -j$(NO_CPUS) V=1 make -C lrc/build -j$(NO_CPUS) V=1
######################## # GNOME client configure
## gnome client build ## cd client-gnome && \
######################## mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DLibRingClient_PROJECT_DIR=/$(CURDIR)/lrc \
-DGSETTINGS_LOCALCOMPILE=OFF \
$(CMAKE_OPTIONS) ..
# GNOME client build
make -C client-gnome/build LDFLAGS="-lpthread" -j$(NO_CPUS) V=1 make -C client-gnome/build LDFLAGS="-lpthread" -j$(NO_CPUS) V=1
################################### # Qt client configure and build
## qt client configure and build ##
###################################
cd client-qt && \ cd client-qt && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
......
...@@ -85,8 +85,7 @@ cd %{_builddir}/ring-project/daemon && \ ...@@ -85,8 +85,7 @@ cd %{_builddir}/ring-project/daemon && \
./autogen.sh && \ ./autogen.sh && \
./configure \ ./configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir} \ --libdir=%{_libdir}
--disable-shared
# Build the daemon. # Build the daemon.
make -C %{_builddir}/ring-project/daemon %{_smp_mflags} V=1 make -C %{_builddir}/ring-project/daemon %{_smp_mflags} V=1
...@@ -102,6 +101,7 @@ rm -rfv %{buildroot}/%{_libdir}/*.la ...@@ -102,6 +101,7 @@ rm -rfv %{buildroot}/%{_libdir}/*.la
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libring.so*
# XXX: Use %%{_libexecdir}/jamid after there's no more OpenSUSE Leap # XXX: Use %%{_libexecdir}/jamid after there's no more OpenSUSE Leap
# < 16 (see https://en.opensuse.org/openSUSE:Specfile_guidelines). # < 16 (see https://en.opensuse.org/openSUSE:Specfile_guidelines).
/usr/libexec/jamid /usr/libexec/jamid
......
...@@ -34,6 +34,7 @@ users. ...@@ -34,6 +34,7 @@ users.
cd %{_builddir}/ring-project/lrc && \ cd %{_builddir}/ring-project/lrc && \
mkdir build && cd build && \ mkdir build && cd build && \
cmake -DRING_BUILD_DIR=%{_builddir}/ring-project/daemon/src \ cmake -DRING_BUILD_DIR=%{_builddir}/ring-project/daemon/src \
-DENABLE_LIBWRAP=true \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=Debug \
......
#!/usr/bin/env bash #!/usr/bin/env bash
# Build and install to a local prefix under this repository. # Build and install to a local prefix under this repository.
export OSTYPE
# Flags: # Flags:
...@@ -81,7 +80,7 @@ else ...@@ -81,7 +80,7 @@ else
BUILDDIR="build-local" BUILDDIR="build-local"
fi fi
# dring # jamid
DAEMON=${TOP}/daemon DAEMON=${TOP}/daemon
cd "$DAEMON" cd "$DAEMON"
...@@ -96,15 +95,10 @@ mkdir -p contrib/native ...@@ -96,15 +95,10 @@ mkdir -p contrib/native
# Build the daemon itself. # Build the daemon itself.
test -f configure || ./autogen.sh test -f configure || ./autogen.sh
if [[ "$OSTYPE" != "darwin"* ]]; then
# Keep the shared libaries on MAC OSX.
sharedLib="--disable-shared"
fi
if [ "${global}" = "true" ]; then if [ "${global}" = "true" ]; then
./configure $sharedLib "$CONFIGURE_FLAGS" ${prefix:+"--prefix=$prefix"} ./configure "$CONFIGURE_FLAGS" ${prefix:+"--prefix=$prefix"}
else else
./configure $sharedLib "$CONFIGURE_FLAGS" --prefix="${INSTALL}/daemon" ./configure "$CONFIGURE_FLAGS" --prefix="${INSTALL}/daemon"
fi fi
make -j"${proc}" V=1 make -j"${proc}" V=1
make_install "${global}" "${priv_install}" make_install "${global}" "${priv_install}"
...@@ -144,6 +138,7 @@ lrc_cmake_flags=(-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" ...@@ -144,6 +138,7 @@ lrc_cmake_flags=(-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}"
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug
-DQT5_VER="${qt5ver}" -DQT5_VER="${qt5ver}"
-DQT5_PATH="${qt5path}" -DQT5_PATH="${qt5path}"
-DENABLE_LIBWRAP=true
$static) $static)
if [ "${global}" = "true" ]; then if [ "${global}" = "true" ]; then
lrc_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"}) lrc_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment