Update readme about libmbedtls and libsodium (#1186)

* compile mbedTLS as shared library

1. Without "SHARED" defined, mbedTLS will be compile as static library. 
2. There's no need to install libmbedtls-dev & libsodium-dev from repository, because they're comiled and installed from the latest source.

* update Ubuntu/Debian build depend

Add dh-autoreconf as build depend for Ubuntu/Debian
This commit is contained in:
Cokebar Chi
2017-02-04 11:59:11 +08:00
committed by Max Lv
parent a0757a4a02
commit 8406c74cf7
+7 -7
View File
@@ -51,7 +51,7 @@ popd
wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz
tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz
pushd mbedtls-$MBEDTLS_VER
env CFLAGS="-fPIC" make
make SHARED=1
sudo make install
popd
```
@@ -130,8 +130,8 @@ section below.
``` bash
cd shadowsocks-libev
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool \
gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev libmbedtls-dev \
libev-dev libudns-dev libsodium-dev
gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev \
libev-dev libudns-dev dh-autoreconf
./autogen.sh && dpkg-buildpackage -b -us -uc -i
cd ..
sudo dpkg -i shadowsocks-libev*.deb
@@ -163,7 +163,7 @@ If you are using CentOS 7, you need to install these prequirement to build from
```bash
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel libmbedtls-devel -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y
```
#### Install from repository
@@ -217,11 +217,11 @@ e.g. Ubuntu, Debian or Linux Mint, you can build the binary like this:
```bash
# Debian / Ubuntu
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libmbedtls-dev libev-dev libudns-dev libsodium-dev
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libudns-dev
# CentOS / Fedora / RHEL
sudo yum install gettext gcc autoconf libtool automake make libmbedtls-devel asciidoc xmlto udns-devel libev-devel
sudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto udns-devel libev-devel
# Arch
sudo pacman -S gettext gcc autoconf libtool automake make mbedtls asciidoc xmlto udns libev libsodium
sudo pacman -S gettext gcc autoconf libtool automake make asciidoc xmlto udns libev
./autogen.sh && ./configure && make
sudo make install
```