-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Cimpress-MCP/static_link
- Loading branch information
Showing
7 changed files
with
79 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
FROM alpine:edge | ||
MAINTAINER Calvin Leung Huang <https://github.com/cleung2010> | ||
|
||
RUN apk --no-cache --no-progress add ca-certificates git libssh2 openssl \ | ||
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | ||
|
||
RUN apk update | ||
RUN apk --no-cache --no-progress add ca-certificates git go gcc musl-dev make cmake http-parser@testing perl \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
COPY . /build | ||
WORKDIR /app | ||
|
||
RUN /build/configure.sh | ||
|
||
ENTRYPOINT ["/build/build.sh"] | ||
ENTRYPOINT ["/app/build/build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
#!/bin/sh | ||
set -x | ||
set -e | ||
|
||
# Set temp environment vars | ||
export LIBGIT2REPO=https://github.com/libgit2/libgit2.git | ||
export LIBGIT2BRANCH=v0.24.0 | ||
export LIBGIT2PATH=/tmp/libgit2 | ||
export PKG_CONFIG_PATH="/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/" | ||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/tmp/libgit2/install/lib/pkgconfig:/tmp/openssl/install/lib/pkgconfig:/tmp/libssh2/build/src" | ||
|
||
# Compile & Install libgit2 (v0.23) | ||
git clone -b ${LIBGIT2BRANCH} --depth 1 -- ${LIBGIT2REPO} ${LIBGIT2PATH} | ||
|
||
mkdir -p ${LIBGIT2PATH}/build | ||
cd ${LIBGIT2PATH}/build | ||
cmake -DBUILD_CLAR=OFF .. | ||
cmake -DTHREADSAFE=ON \ | ||
-DBUILD_CLAR=OFF \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DCMAKE_C_FLAGS=-fPIC \ | ||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \ | ||
-DCMAKE_INSTALL_PREFIX=../install \ | ||
.. | ||
cmake --build . --target install | ||
|
||
# Cleanup | ||
rm -r ${LIBGIT2PATH} | ||
# rm -r ${LIBGIT2PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
set -x | ||
|
||
# Set temp environment vars | ||
export REPO=https://github.com/libssh2/libssh2 | ||
export BRANCH=libssh2-1.7.0 | ||
export REPO_PATH=/tmp/libssh2 | ||
export PKG_CONFIG_PATH="/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/" | ||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/tmp/libgit2/install/lib/pkgconfig:/tmp/openssl/install/lib/pkgconfig:/tmp/libssh2/build/src" | ||
|
||
# Compile & Install libgit2 (v0.23) | ||
git clone -b ${BRANCH} --depth 1 -- ${REPO} ${REPO_PATH} | ||
|
||
mkdir -p ${REPO_PATH}/build | ||
cd ${REPO_PATH}/build | ||
cmake -DTHREADSAFE=ON \ | ||
-DBUILD_CLAR=OFF \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DCMAKE_C_FLAGS=-fPIC \ | ||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \ | ||
-DCMAKE_INSTALL_PREFIX=../install \ | ||
.. | ||
cmake --build . --target install | ||
|
||
# Cleanup | ||
# rm -r ${LIBGIT2PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
set -x | ||
set -e | ||
|
||
# Set temp environment vars | ||
export REPO=https://github.com/openssl/openssl.git | ||
export BRANCH=OpenSSL_1_0_2h | ||
export BUILD_PATH=/tmp/openssl | ||
|
||
# Compile & Install libgit2 (v0.23) | ||
git clone -b ${BRANCH} --depth 1 -- ${REPO} ${BUILD_PATH} | ||
|
||
mkdir -p ${BUILD_PATH}/install/lib | ||
cd ${BUILD_PATH} | ||
./config threads no-shared --prefix=${BUILD_PATH}/install -fPIC -DOPENSSL_PIC && | ||
make depend && | ||
make && | ||
make install | ||
|
||
# Cleanup | ||
# rm -r ${LIBGIT2PATH} |