Update build scripts

This commit is contained in:
Tindy X
2020-07-01 02:24:09 +08:00
parent f9eba5b179
commit 6f721aec6d
4 changed files with 13 additions and 10 deletions

View File

@@ -3,13 +3,14 @@ MAINTAINER Tindy X <tindy.it@gmail.com>
# build minimized
RUN apk add git g++ build-base linux-headers cmake && \
apk add libressl-dev curl-dev rapidjson-dev libevent-dev pcre2-dev yaml-cpp-dev python2 && \
apk add curl-dev rapidjson-dev libevent-dev pcre2-dev yaml-cpp-dev python2 && \
git clone https://github.com/svaarala/duktape --depth=1 && \
cd duktape && \
python2 -m ensurepip && \
pip2 install PyYAML && \
mkdir dist && \
python2 util/dist.py && \
cd dist/src && \
cd dist/source/src && \
cc -c -O3 -o duktape.o duktape.c && \
cc -c -O3 -o duk_module_node.o -I. ../extras/module-node/duk_module_node.c && \
ar cr libduktape.a duktape.o && \
@@ -17,7 +18,7 @@ RUN apk add git g++ build-base linux-headers cmake && \
install -m0644 *.a /usr/lib && \
install -m0644 duk*.h /usr/include && \
install -m0644 ../extras/module-node/duk_module_node.h /usr/include && \
cd ../../.. && \
cd ../../../.. && \
rm -rf duktape /usr/lib/python2.7 && \
git clone https://github.com/tindy2013/subconverter --depth=1 && \
cd subconverter && \
@@ -28,7 +29,7 @@ RUN apk add git g++ build-base linux-headers cmake && \
cd .. && \
rm -rf subconverter && \
apk add pcre2 libcurl yaml-cpp libevent && \
apk del git gcc g++ build-base linux-headers cmake libressl-dev curl-dev rapidjson-dev libevent-dev pcre2-dev yaml-cpp-dev python2
apk del git gcc g++ build-base linux-headers cmake curl-dev rapidjson-dev libevent-dev pcre2-dev yaml-cpp-dev python2
# set entry
WORKDIR /base