diff --git a/README.md b/README.md index d87f107de..d66c1d913 100644 --- a/README.md +++ b/README.md @@ -66,41 +66,49 @@ Before that, run `./debian/flavors/no_ngcp` in order to remove any NGCP dependen This will produce a number of `.deb` files, which can then be installed using the `dpkg -i` command. -The generated files are (with version 2.3.0 being built on an amd64 system): +The generated files are (with version 6.2.0.0 being built on an amd64 system): -* `ngcp-rtpengine_2.3.0_all.deb` +* `ngcp-rtpengine_6.2.0.0+0~mr6.2.0.0_all.deb` This is a meta-package, which doesn't contain or install anything on its own, but rather only depends on the other packages to be installed. Not strictly necessary to be installed. -* `ngcp-rtpengine-daemon_2.3.0_amd64.deb` +* `ngcp-rtpengine-daemon_6.2.0.0+0~mr6.2.0.0_amd64.deb` This installed the userspace daemon, which is the main workhorse of rtpengine. This is the minimum requirement for anything to work. -* `ngcp-rtpengine-dbg_2.3.0_amd64.deb` - - Debugging symbols for the daemon. Optional. - -* `ngcp-rtpengine-iptables_2.3.0_amd64.deb` +* `ngcp-rtpengine-iptables_6.2.0.0+0~mr6.2.0.0_amd64.deb` Installs the plugin for `iptables` and `ip6tables`. Necessary for in-kernel operation. -* `ngcp-rtpengine-kernel-dkms_2.3.0_all.deb` +* `ngcp-rtpengine-kernel-dkms_6.2.0.0+0~mr6.2.0.0_all.deb` Kernel module, DKMS version of the package. Recommended for in-kernel operation. The kernel module will be compiled against the currently running kernel using DKMS. -* `ngcp-rtpengine-kernel-source_2.3.0_all.deb` +* `ngcp-rtpengine-kernel-source_6.2.0.0+0~mr6.2.0.0_all.deb` If DKMS is unavailable or not desired, then this package will install the sources for the kernel module for manual compilation. Required for in-kernel operation, but only if the DKMS package can't be used. +* `ngcp-rtpengine-recording-daemon_6.2.0.0+0~mr6.2.0.0_amd64.deb` + + Optional separate userspace daemon used for call recording features. + +* `-dbg...` or `-dbgsym...` packages + + Debugging symbols for the various components. Optional. + For transcoding purposes, Debian provides an additional package `libavcodec-extra` to replace the regular `libavcodec` package. It is recommended to install this extra package to offer support for additional codecs. +To support the G.729 codec for transcoding purposes, the external library *bcg729* is required. To +include this in a Debian build environment, a Debian-packaged version is required, which is available +from [GitHub](https://github.com/ossobv/bcg729-deb). + Manual Compilation ------------------ @@ -120,7 +128,8 @@ There's 3 parts to *rtpengine*, which can be found in the respective subdirector - *XMLRPC-C* version 1.16.08 or higher - *hiredis* library - *libiptc* library for iptables management (optional) - - *ffmpeg* codec libraries for transcoding (options) such as *libavcodec*, *libavfilter*, *libavresample* + - *ffmpeg* codec libraries for transcoding (optional) such as *libavcodec*, *libavfilter*, *libavresample* + - *bcg729* for full G.729 transcoding support (optional) The `Makefile` contains a few Debian-specific flags, which may have to removed for compilation to be successful. This will not affect operation in any way. diff --git a/daemon/Makefile b/daemon/Makefile index c084730bd..c1e82ef7d 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -4,33 +4,40 @@ with_iptables_option ?= yes with_transcoding ?= yes # look for bcg729 -# system +# system pkg-config +ifeq ($(shell pkg-config --exists libbcg729 && echo yes),yes) +have_bcg729 := yes +bcg729_inc := $(shell pkg-config --cflags libbcg729) +bcg729_lib := $(shell pkg-config --libs libbcg729) +else +# system generic ifneq (,$(wildcard /usr/include/bcg729/decoder.h)) have_bcg729 := yes else # /usr/src ifneq (,$(wildcard /usr/src/bcg729/include/bcg729/decoder.h)) have_bcg729 := yes -bcg729_inc := /usr/src/bcg729/include/ -bcg729_lib := /usr/src/bcg729/src/ +bcg729_inc := -I/usr/src/bcg729/include/ +bcg729_lib := -L/usr/src/bcg729/src/ -lbcg729 else # rfuchs dev ifneq (,$(wildcard $(HOME)/src/bcg729/include/bcg729/decoder.h)) have_bcg729 := yes -bcg729_inc := $(HOME)/src/bcg729/include/ -bcg729_lib := $(HOME)/src/bcg729/src/ +bcg729_inc := -I$(HOME)/src/bcg729/include/ +bcg729_lib := -L$(HOME)/src/bcg729/src/ -lbcg729 else # home directory ifneq (,$(wildcard $(HOME)/bcg729/include/bcg729/decoder.h)) have_bcg729 := yes -bcg729_inc := $(HOME)/bcg729/include/ -bcg729_lib := $(HOME)/bcg729/src/ +bcg729_inc := -I$(HOME)/bcg729/include/ +bcg729_lib := -L$(HOME)/bcg729/src/ -lbcg729 else # included toplevel ifneq (,$(wildcard ../bcg729/include/bcg729/decoder.h)) have_bcg729 := yes -bcg729_inc := ../bcg729/include/ -bcg729_lib := ../bcg729/src/ +bcg729_inc := -I../bcg729/include/ +bcg729_lib := -L../bcg729/src/ -lbcg729 +endif endif endif endif @@ -39,37 +46,35 @@ endif CFLAGS= -g -Wall -pthread -fno-strict-aliasing CFLAGS+= -std=c99 -CFLAGS+= `pkg-config --cflags glib-2.0` -CFLAGS+= `pkg-config --cflags gthread-2.0` -CFLAGS+= `pkg-config --cflags zlib` -CFLAGS+= `pkg-config --cflags openssl` -CFLAGS+= `pkg-config --cflags libevent_pthreads` -CFLAGS+= `pcre-config --cflags` -CFLAGS+= `pkg-config xmlrpc_client --cflags 2> /dev/null || xmlrpc-c-config client --cflags` -CFLAGS+= `pkg-config xmlrpc --cflags 2> /dev/null` -CFLAGS+= `pkg-config xmlrpc_util --cflags 2> /dev/null` -CFLAGS+= `pkg-config --cflags json-glib-1.0` +CFLAGS+= $(shell pkg-config --cflags glib-2.0) +CFLAGS+= $(shell pkg-config --cflags gthread-2.0) +CFLAGS+= $(shell pkg-config --cflags zlib) +CFLAGS+= $(shell pkg-config --cflags openssl) +CFLAGS+= $(shell pkg-config --cflags libevent_pthreads) +CFLAGS+= $(shell pcre-config --cflags) +CFLAGS+= $(shell pkg-config xmlrpc_client --cflags 2> /dev/null || xmlrpc-c-config client --cflags) +CFLAGS+= $(shell pkg-config xmlrpc --cflags 2> /dev/null) +CFLAGS+= $(shell pkg-config xmlrpc_util --cflags 2> /dev/null) +CFLAGS+= $(shell pkg-config --cflags json-glib-1.0) ifeq ($(with_iptables_option),yes) -CFLAGS+= `pkg-config --cflags libiptc` +CFLAGS+= $(shell pkg-config --cflags libiptc) CFLAGS+= -DWITH_IPTABLES_OPTION endif CFLAGS+= -I. -I../kernel-module/ -I../lib/ CFLAGS+= -D_GNU_SOURCE ifeq ($(with_transcoding),yes) -CFLAGS+= `pkg-config --cflags libavcodec` -CFLAGS+= `pkg-config --cflags libavformat` -CFLAGS+= `pkg-config --cflags libavutil` -CFLAGS+= `pkg-config --cflags libavresample` -CFLAGS+= `pkg-config --cflags libavfilter` +CFLAGS+= $(shell pkg-config --cflags libavcodec) +CFLAGS+= $(shell pkg-config --cflags libavformat) +CFLAGS+= $(shell pkg-config --cflags libavutil) +CFLAGS+= $(shell pkg-config --cflags libavresample) +CFLAGS+= $(shell pkg-config --cflags libavfilter) CFLAGS+= -DWITH_TRANSCODING else CFLAGS+= -DWITHOUT_CODECLIB endif ifeq ($(have_bcg729),yes) CFLAGS+= -DHAVE_BCG729 -ifneq ($(bcg729_inc),) -CFLAGS+= -I$(bcg729_inc) -endif +CFLAGS+= $(bcg729_inc) endif CFLAGS+= -DRE_PLUGIN_DIR="\"/usr/lib/rtpengine\"" @@ -80,35 +85,32 @@ CFLAGS+= -DRE_PLUGIN_DIR="\"/usr/lib/rtpengine\"" #CFLAGS+= -DSTRICT_SDES_KEY_LIFETIME LDFLAGS= -lm -LDFLAGS+= `pkg-config --libs glib-2.0` -LDFLAGS+= `pkg-config --libs gthread-2.0` -LDFLAGS+= `pkg-config --libs zlib` -LDFLAGS+= `pkg-config --libs libpcre` -LDFLAGS+= `pkg-config --libs libcrypto` -LDFLAGS+= `pkg-config --libs openssl` -LDFLAGS+= `pkg-config --libs libevent_pthreads` +LDFLAGS+= $(shell pkg-config --libs glib-2.0) +LDFLAGS+= $(shell pkg-config --libs gthread-2.0) +LDFLAGS+= $(shell pkg-config --libs zlib) +LDFLAGS+= $(shell pkg-config --libs libpcre) +LDFLAGS+= $(shell pkg-config --libs libcrypto) +LDFLAGS+= $(shell pkg-config --libs openssl) +LDFLAGS+= $(shell pkg-config --libs libevent_pthreads) LDFLAGS+= -lpcap -LDFLAGS+= `pcre-config --libs` -LDFLAGS+= `pkg-config xmlrpc_client --libs 2> /dev/null || xmlrpc-c-config client --libs` -LDFLAGS+= `pkg-config xmlrpc --libs 2> /dev/null` -LDFLAGS+= `pkg-config xmlrpc_util --libs 2> /dev/null` +LDFLAGS+= $(shell pcre-config --libs) +LDFLAGS+= $(shell pkg-config xmlrpc_client --libs 2> /dev/null || xmlrpc-c-config client --libs) +LDFLAGS+= $(shell pkg-config xmlrpc --libs 2> /dev/null) +LDFLAGS+= $(shell pkg-config xmlrpc_util --libs 2> /dev/null) LDFLAGS+= -lhiredis -LDFLAGS+= `pkg-config --libs json-glib-1.0` +LDFLAGS+= $(shell pkg-config --libs json-glib-1.0) ifeq ($(with_iptables_option),yes) -LDFLAGS+= `pkg-config --libs libiptc` +LDFLAGS+= $(shell pkg-config --libs libiptc) endif ifeq ($(with_transcoding),yes) -LDFLAGS+= `pkg-config --libs libavcodec` -LDFLAGS+= `pkg-config --libs libavformat` -LDFLAGS+= `pkg-config --libs libavutil` -LDFLAGS+= `pkg-config --libs libavresample` -LDFLAGS+= `pkg-config --libs libavfilter` +LDFLAGS+= $(shell pkg-config --libs libavcodec) +LDFLAGS+= $(shell pkg-config --libs libavformat) +LDFLAGS+= $(shell pkg-config --libs libavutil) +LDFLAGS+= $(shell pkg-config --libs libavresample) +LDFLAGS+= $(shell pkg-config --libs libavfilter) endif ifeq ($(have_bcg729),yes) -ifneq ($(bcg729_lib),) -LDFLAGS+= -L$(bcg729_lib) -endif -LDFLAGS+= -lbcg729 +LDFLAGS+= $(bcg729_lib) endif include ../lib/lib.Makefile diff --git a/lib/lib.Makefile b/lib/lib.Makefile index d2867fb4b..2c2752ed2 100644 --- a/lib/lib.Makefile +++ b/lib/lib.Makefile @@ -37,8 +37,8 @@ ifneq ($(DBG),yes) DPKG_BLDFLGS= $(shell which dpkg-buildflags 2>/dev/null) ifneq ($(DPKG_BLDFLGS),) # support http://wiki.debian.org/Hardening for >=wheezy - CFLAGS+= `dpkg-buildflags --get CFLAGS` - CPPFLAGS+= `dpkg-buildflags --get CPPFLAGS` - LDFLAGS+= `dpkg-buildflags --get LDFLAGS` + CFLAGS+= $(shell dpkg-buildflags --get CFLAGS) + CPPFLAGS+= $(shell dpkg-buildflags --get CPPFLAGS) + LDFLAGS+= $(shell dpkg-buildflags --get LDFLAGS) endif endif diff --git a/recording-daemon/Makefile b/recording-daemon/Makefile index a68aed0e8..ce6c1790b 100644 --- a/recording-daemon/Makefile +++ b/recording-daemon/Makefile @@ -3,26 +3,26 @@ TARGET= rtpengine-recording CFLAGS= -g -Wall -pthread -I. -I../lib/ CFLAGS+= -std=c99 CFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE -CFLAGS+= `pkg-config --cflags glib-2.0` -CFLAGS+= `pkg-config --cflags gthread-2.0` -CFLAGS+= `pkg-config --cflags libavcodec` -CFLAGS+= `pkg-config --cflags libavformat` -CFLAGS+= `pkg-config --cflags libavutil` -CFLAGS+= `pkg-config --cflags libavresample` -CFLAGS+= `pkg-config --cflags libavfilter` -CFLAGS+= `mysql_config --cflags` -CFLAGS+= `pkg-config --cflags openssl` +CFLAGS+= $(shell pkg-config --cflags glib-2.0) +CFLAGS+= $(shell pkg-config --cflags gthread-2.0) +CFLAGS+= $(shell pkg-config --cflags libavcodec) +CFLAGS+= $(shell pkg-config --cflags libavformat) +CFLAGS+= $(shell pkg-config --cflags libavutil) +CFLAGS+= $(shell pkg-config --cflags libavresample) +CFLAGS+= $(shell pkg-config --cflags libavfilter) +CFLAGS+= $(shell mysql_config --cflags) +CFLAGS+= $(shell pkg-config --cflags openssl) LDFLAGS= -lm -LDFLAGS+= `pkg-config --libs glib-2.0` -LDFLAGS+= `pkg-config --libs gthread-2.0` -LDFLAGS+= `pkg-config --libs libavcodec` -LDFLAGS+= `pkg-config --libs libavformat` -LDFLAGS+= `pkg-config --libs libavutil` -LDFLAGS+= `pkg-config --libs libavresample` -LDFLAGS+= `pkg-config --libs libavfilter` -LDFLAGS+= `mysql_config --libs` -LDFLAGS+= `pkg-config --libs openssl` +LDFLAGS+= $(shell pkg-config --libs glib-2.0) +LDFLAGS+= $(shell pkg-config --libs gthread-2.0) +LDFLAGS+= $(shell pkg-config --libs libavcodec) +LDFLAGS+= $(shell pkg-config --libs libavformat) +LDFLAGS+= $(shell pkg-config --libs libavutil) +LDFLAGS+= $(shell pkg-config --libs libavresample) +LDFLAGS+= $(shell pkg-config --libs libavfilter) +LDFLAGS+= $(shell mysql_config --libs) +LDFLAGS+= $(shell pkg-config --libs openssl) include ../lib/lib.Makefile