mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-25 18:23:42 +00:00
@@ -18,18 +18,20 @@
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
FROM debian:testing
|
||||
FROM debian:stretch
|
||||
|
||||
ARG REPO=shadowsocks
|
||||
ARG REV=master
|
||||
|
||||
ADD docker/mingw/prepare.sh /
|
||||
ADD docker/mingw/apt.sh /
|
||||
|
||||
RUN \
|
||||
/bin/bash -c "source /prepare.sh && dk_prepare" && \
|
||||
/bin/bash -c "source /apt.sh && dk_prepare" && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /build
|
||||
|
||||
ADD docker/mingw/prepare.sh /
|
||||
|
||||
RUN /bin/bash -c "source /prepare.sh && dk_download"
|
||||
|
||||
ADD docker/mingw/deps.sh /
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Functions for building MinGW port in Docker
|
||||
#
|
||||
# This file is part of the shadowsocks-libev.
|
||||
#
|
||||
# shadowsocks-libev is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# shadowsocks-libev is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with shadowsocks-libev; see the file COPYING. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
# Build steps
|
||||
|
||||
dk_prepare() {
|
||||
apt-get update -y
|
||||
apt-get install --no-install-recommends -y \
|
||||
mingw-w64 aria2 git make automake autoconf libtool ca-certificates
|
||||
}
|
||||
@@ -43,6 +43,7 @@ build_proj() {
|
||||
--with-pcre="$dep" \
|
||||
--with-cares="$dep" \
|
||||
CFLAGS="-DCARES_STATICLIB -DPCRE_STATIC"
|
||||
|
||||
make clean
|
||||
make -j$cpu LDFLAGS="-all-static -L${dep}/lib"
|
||||
make install
|
||||
|
||||
@@ -53,6 +53,7 @@ build_deps() {
|
||||
|
||||
# sodium
|
||||
cd "$SRC/$SODIUM_SRC"
|
||||
./autogen.sh
|
||||
./configure $args
|
||||
make clean
|
||||
make -j$cpu install
|
||||
|
||||
@@ -48,9 +48,9 @@ MBEDTLS_SRC=mbedtls-${MBEDTLS_VER}
|
||||
MBEDTLS_URL=https://tls.mbed.org/download/mbedtls-${MBEDTLS_VER}-apache.tgz
|
||||
|
||||
## Sodium
|
||||
SODIUM_VER=1.0.16
|
||||
SODIUM_SRC=libsodium-${SODIUM_VER}
|
||||
SODIUM_URL=https://download.libsodium.org/libsodium/releases/${SODIUM_SRC}.tar.gz
|
||||
SODIUM_VER=1.0.18
|
||||
SODIUM_SRC=libsodium-${SODIUM_VER}-RELEASE
|
||||
SODIUM_URL=https://github.com/jedisct1/libsodium/archive/${SODIUM_VER}-RELEASE.tar.gz
|
||||
|
||||
## PCRE
|
||||
PCRE_VER=8.41
|
||||
@@ -64,12 +64,6 @@ CARES_URL=https://c-ares.haxx.se/download/${CARES_SRC}.tar.gz
|
||||
|
||||
# Build steps
|
||||
|
||||
dk_prepare() {
|
||||
apt-get update -y
|
||||
apt-get install --no-install-recommends -y \
|
||||
mingw-w64 aria2 git make automake autoconf libtool ca-certificates
|
||||
}
|
||||
|
||||
dk_download() {
|
||||
mkdir -p "${SRC}"
|
||||
cd "${SRC}"
|
||||
|
||||
Reference in New Issue
Block a user