#!/bin/sh -ex rc-service networking start apk update apk add build-base xz mingw-w64-gcc git tar -xvzf include.tar.gz mv include/openssl/ /usr/x86_64-w64-mingw32/include mv include/tls.h /usr/x86_64-w64-mingw32/include mv libtls.a /usr/x86_64-w64-mingw32/lib mv libssl.a /usr/x86_64-w64-mingw32/lib mv libcrypto.a /usr/x86_64-w64-mingw32/lib cd busybox-w32 cp /root/busybox-w32-packaging/config .config git apply /root/busybox-w32-packaging/libressl.patch # For some reason this code only causes errors on -O0 if [ -n "$ZERO_PATCH" ]; then git apply /root/busybox-w32-packaging/zero.patch fi sed -i "s/CONFIG_EXTRA_CFLAGS=\"\"/CONFIG_EXTRA_CFLAGS=\"$CFLAGS\"/g" .config make cp busybox.exe ..