Skip to content

Commit

Permalink
Update Asterisk to 16.0.0 and MONGO-C to 1.13.0 (#22)
Browse files Browse the repository at this point in the history
* [ASTERISK] updated to 16.0.0
* [MONGOC DRIVER] updated to 1.13.0
  • Loading branch information
minoruta authored Nov 10, 2018
1 parent 00d6360 commit ad5ed49
Show file tree
Hide file tree
Showing 9 changed files with 2,732 additions and 36 deletions.
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ARG VERSION_ASTERISK
ARG VERSION_MONGOC
ARG VERSION_LIBSRTP

SHELL ["/bin/bash", "-c"]

WORKDIR /root
RUN mkdir src
COPY src/* src/
Expand All @@ -24,8 +26,10 @@ RUN apt -qq update \
libsqlite3-dev \
libjansson-dev \
libcurl4-openssl-dev \
libedit-dev \
pkg-config \
build-essential \
cmake \
autoconf \
uuid-dev \
wget \
Expand Down Expand Up @@ -53,7 +57,14 @@ RUN wget https://github.com/cisco/libsrtp/archive/v$VERSION_LIBSRTP.tar.gz \
RUN cd $HOME \
&& wget -nv "https://github.com/mongodb/mongo-c-driver/releases/download/$VERSION_MONGOC/mongo-c-driver-$VERSION_MONGOC.tar.gz" -O - | tar xzf - \
&& cd mongo-c-driver-$VERSION_MONGOC \
&& ./configure --disable-automatic-init-and-cleanup > /dev/null \
&& function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } \
&& if version_gt $VERSION_MONGOC "1.10"; then \
mkdir cmake-build; \
cd cmake-build; \
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..; \
else \
./configure --disable-automatic-init-and-cleanup > /dev/null; \
fi \
&& make all install > make.log \
&& make clean \
&& cd $HOME \
Expand Down Expand Up @@ -87,7 +98,9 @@ RUN cd $HOME \
&& git diff build_tools/menuselect-deps.in configure.ac makeopts.in > $HOME/ast_mongo/mongodb.for.asterisk.patch \
&& git diff HEAD > $HOME/ast_mongo/ast_mongo-$VERSION_ASTERISK.patch \
&& ./bootstrap.sh \
&& ./configure --disable-xmldoc --with-pjproject-bundled > /dev/null \
&& function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } \
&& if version_gt $VERSION_ASTERISK "16"; then JANSSONBUNDLED="--with-jansson-bundled"; fi \
&& ./configure --disable-xmldoc --with-pjproject-bundled $JANSSONBUNDLED > /dev/null \
&& tar czf $HOME/ast_mongo/asterisk-$VERSION_ASTERISK-config.log.tgz config.log \
&& make all > make.log \
&& make install > install.log \
Expand Down
6 changes: 4 additions & 2 deletions patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ In order to build the `ast_mongo` plugins, you need to build it with Asterisk.
```
$ wget -nv "https://github.com/mongodb/mongo-c-driver/releases/download/$VERSION_MONGOC/mongo-c-driver-$VERSION_MONGOC.tar.gz" -O - | tar xzf -
$ cd mongo-c-driver-$VERSION_MONGOC
$ ./configure --disable-automatic-init-and-cleanup
$ mkdir cmake-build
$ cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
$ make all && sudo make install
```
1. Prepare the code of asterisk;
```
$ wget -nv "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-a.b.c" -O - | tar -zxf -
$ wget -nv "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-a.b.c.tar.gz" -O - | tar -zxf -
$ cd asterisk-a.b.c
```
1. Apply a patch here;
Expand Down
Loading

0 comments on commit ad5ed49

Please sign in to comment.