build: add support for meson

Change-Id: I331522a09257d4ae787893ff72c270886c1aa210
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
This commit is contained in:
Vladimir Stoiakin
2019-01-18 19:21:41 +03:00
committed by Adrien Béraud
parent c4a7918c0c
commit 387f6988cd
22 changed files with 1347 additions and 57 deletions

84
README
View File

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Introduction
------------
GNU Ring is a Voice-over-IP software phone. We want it to be:
GNU Jami is a Voice-over-IP software phone. We want it to be:
- user friendly (fast, sleek, easy to learn interface)
- professional grade (transfers, holds, optimal audio quality)
- compatible with Asterisk (using SIP account)
@ -27,17 +27,17 @@ GNU Ring is a Voice-over-IP software phone. We want it to be:
- customizable
As the SIP/audio daemon and the user interface are separate processes,
it is easy to provide different user interfaces. GNU Ring comes with
it is easy to provide different user interfaces. GNU Jami comes with
various graphical user interfaces and even scripts to control the daemon from
the shell.
GNU Ring is currently used by the support team of Savoir-faire Linux Inc.
GNU Jami is currently used by the support team of Savoir-faire Linux Inc.
More information is available on the project homepage:
https://www.jami.net/
This source tree contains the daemon application only, DRing, that handles
the business logic of GNU Ring. UIs are located in differents repositories. See
This source tree contains the daemon application only that handles
the business logic of GNU Jami. UIs are located in differents repositories. See
the Contributing section for more information.
@ -47,7 +47,6 @@ Short description of content of source tree
- src/ is the core of DRing.
- bin/ contains applications main code.
- bin/dbus, the D-Bus XML interfaces, and C++ bindings
- bin/restcpp, the C++ REST API implemented with Restinio
About Savoir-faire Linux
------------------------
@ -68,19 +67,54 @@ cd native
../bootstrap
make
2) Then the dring application
2) Then the jamid application
cd ../../
./autogen.sh
./configure
make
make install
mkdir build
export PATH=$PATH:`pwd`/contrib/`cc -dumpmachine`/bin
meson -Dpkg_config_path=`pwd`/contrib/`cc -dumpmachine`/lib/pkgconfig -Ddefault_library=static -Dinterfaces=dbus build
cd build
ninja
ninja install
Done !
More details available here:
https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/Build-instructions
How to compile on Linux for Android
-----------------------------------
1) Download and install Android NDK
2) Compile the dependencies
export ANDROID_NDK=<NDK>
export ANDROID_ABI=arm64-v8a
export ANDROID_API=29
export TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64
export TARGET=aarch64-linux-android
export CC=$TOOLCHAIN/bin/$TARGET$ANDROID_API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$ANDROID_API-clang++
export AR=$TOOLCHAIN/bin/$TARGET-ar
export LD=$TOOLCHAIN/bin/$TARGET-ld
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
export STRIP=$TOOLCHAIN/bin/$TARGET-strip
export PATH=$PATH:$TOOLCHAIN/bin
cd contrib
mkdir native
cd native
../bootstrap --build=x86_64-pc-linux-gnu --host=$TARGET$ANDROID_API
make
3) Update directories in the file /cross-files/android_arm64_api29.txt
4) Compile the library libjami.so
cd ../../
mkdir build
meson --cross-file `pwd`/cross-files/android_arm64_api29.txt build
cd build
ninja
ninja install
How to compile on OSX
---------------------
@ -125,7 +159,7 @@ Run: 'brew link --force gettext' to fix it.
Clang compatibility (developers only)
-------------------------------------
It is possible to compile dring with Clang by setting CC and CXX variables
It is possible to compile jamid with Clang by setting CC and CXX variables
to 'clang' and 'clang++' respectively when calling ./configure.
Currently it is not possible to use the DBus interface mechanism, and the
@ -133,26 +167,6 @@ interaction between daemon and client will not work; for each platform where
D-Bus is not available the client should implement all the methods in the
*_stub.cpp files.
How to compile with the REST API
--------------------------------
GNU Ring offers two REST API. One written in C++, and the other written in Cython.
Up to this date, only the C++ API is available. The Cython API will soon follow.
To compile Ring-daemon with the C++ REST API, follow these two steps :
1) Compile the dependencies
cd contrib
mkdir native
cd native
../bootstrap
make
2) Then compile the daemon
cd ../../
./autogen.sh
./configure --without-dbus --with-restcpp
make
SIP accounts
---------------------
@ -162,7 +176,7 @@ clients (KDE and GNOME).
By doing this, you will be able to call other accounts known to this server.
Contributing to GNU Ring
Contributing to GNU Jami
------------------------
Of course we love patches. And contributions. And spring rolls.
@ -175,10 +189,10 @@ contains the client subprojects:
- https://gerrit-ring.savoirfairelinux.com/#/admin/projects/
Do not hesitate to join us and post comments, suggestions, questions
and general feedback on the GNU Ring mailing-list:
and general feedback on the GNU Jami mailing-list:
https://lists.gnu.org/mailman/listinfo/ring
IRC (on #freenode):
- #ring
-- The GNU Ring Team
-- The GNU Jami Team