1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-21 00:25:37 +00:00

[ win32 ] dockerfiles and build.sh edit

This commit is contained in:
Unknown 2022-05-03 15:07:28 +02:00
parent 968562d2d1
commit 47686cd6f6
6 changed files with 82 additions and 3 deletions

View File

@ -34,6 +34,7 @@ configure() {
CC=$1 \
LD=$2 \
LDFLAGS=$4 \
CXX=$CXX_CUST \
CFLAGS="-O2 -I/usr/local/include" \
LIBS=$5 \
CXXFLAGS=$6 \
@ -171,9 +172,10 @@ set_arch() {
LD="i686-w64-mingw32-ld"
MAKE_HOST="x86_64-w32-mingw32"
BIN_SUFFIX=".exe"
CXXFLAGS=""
LDFLAGS=""
LIBS=""
CXXFLAGS="-I/usr/local/include"
CXX_CUST="i686-w64-mingw32-g++"
LDFLAGS="-L/usr/local/lib"
LIBS="-lws2_32"
elif [ "$1" = "win64" ]; then
ARCHIT="$1"
CC="x86_64-w64-mingw32-gcc"

63
docker/win32/Dockerfile Normal file
View File

@ -0,0 +1,63 @@
#
# [ win32 ] elinks docker development environment v0.1a
#
# [*] base system
# get latest debian
FROM debian:latest
# prepare system
RUN apt-get update && apt-get -y install bash \
rsync vim screen git make automake \
gcc-mingw-w64-i686 g++-mingw-w64-i686
# [*] source build tools
# install sources build tools and update
RUN apt-get install -y apt-src && \
grep '^deb ' /etc/apt/sources.list | sed 's/deb /deb-src /' >> /etc/apt/sources.list && \
apt-src update
# [*] install sources
# install sources for openssl and zlib1g-dev
RUN cd /root && apt-src install libssl-dev zlib1g-dev
# [*] elinks openssl development support
#
# build openssl library for win32
# should be win2k compatible
#
RUN cd /root && cd `ls -d /root/openssl-*` && \
sed -i '35 i \\n#undef AI_PASSIVE\n' crypto/bio/b_addr.c && \
CFLAGS="-DWINVER=0x0501 -D_WIN32_WINNT=0x0501" \
./Configure mingw \
no-engine \
no-dso \
no-shared \
no-asm \
no-async \
--prefix=/usr/local \
--cross-compile-prefix=i686-w64-mingw32- && \
make depend && \
make && \
make install_runtime_libs && \
make install_dev
# [*} zlib sources
# build zlib library for win32
RUN cd /root && cd `ls -d /root/zlib-*` && \
CC="i686-w64-mingw32-gcc" \
LD="i686-w64-mingw32-ldd" \
./configure --static --prefix=/usr/local && \
make && \
make install
# [*] elinks sources
# get elinks source
RUN cd /root; git clone https://github.com/rkd77/elinks

2
docker/win32/build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker build -t "elinks-win32-dev:latest" .

3
docker/win32/cleanup.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker container rm elinks
docker image rm elinks-dev

6
docker/win32/run.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
docker run -it \
--name=elinks-win32-dev \
-v /home/miky:/home/miky \
elinks-win32-dev:latest \
/bin/bash

3
docker/win32/shell.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker start elinks
docker exec -it elinks bash