summaryrefslogtreecommitdiff
path: root/contrib/build-env-setup/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/build-env-setup/README.md')
-rw-r--r--contrib/build-env-setup/README.md37
1 files changed, 20 insertions, 17 deletions
diff --git a/contrib/build-env-setup/README.md b/contrib/build-env-setup/README.md
index 1467f73..064f6f8 100644
--- a/contrib/build-env-setup/README.md
+++ b/contrib/build-env-setup/README.md
@@ -78,15 +78,11 @@ true \
&& PKGINIT=true \
&& PKGADD="$SUDO apk add" \
&& PKGDEL="$SUDO apk del" \
- && PKGCLEAN="$SUDO apk clean" \
+ && PKGCLEAN="$SUDO apk cache clean || true" \
&& HOST=x86_64-w64-mingw32 \
&& true
-
-## make, install
-
-As soon environ is configured, we can trigger the build:
-
+### Setup build env
true \
&& GIT_TAG="master" \
&& LIBARCHIVE_VERSION="3.6.2" \
@@ -94,7 +90,6 @@ true \
&& CJSON_VERSION="1.7.15" \
&& PCRE_VERSION="8.45" \
\
- && WORKDIR="/home/${USER}/work" \
&& CACHE_DIR="/var/tmp" \
&& INSTALL_ROOT="/usr/${HOST:-local}" \
&& if test -n "$HOST"; then HOST_="${HOST:?}-" ;fi \
@@ -203,24 +198,32 @@ true \
&& rm -rf "pcre-${PCRE_VERSION:?}" \
&& $SUDO tar -C "${INSTALL_ROOT:?}" -xzf "${PCRE_BINTGZ:?}" \
);fi \
- && printf '\n Build project itself\n\n' \
+ && ${PKGDEL:?} $PKGS_TO_DEL && ${PKGCLEAN:?} \
+ && true
+
+### Make
+true \
+ && WORKDIR="/home/${USER:?}/work" \
+ \
+ && printf '\n Build GateleenResclone\n\n' \
&& mkdir -p "${WORKDIR:?}" && cd "${WORKDIR:?}" \
&& git clone --depth 42 --branch "${GIT_TAG:?}" https://github.com/hiddenalpha/GateleenResclone.git . \
&& git config advice.detachedHead false \
&& git checkout --detach "${GIT_TAG:?}" \
- && if test -n "$HOST"; then true \
+ && if echo $HOST|grep -q '\-mingw'; then true \
&& HORSCHT="TOOLCHAIN=mingw CC=$HOST-cc LD=$HOST-ld AR=$HOST-ar BINEXT=.exe LIBSEXT=.lib" \
- && sed -i -E 's;^CFLAGS \?=(.*)?$;CFLAGS ?= -DPCRE_STATIC=1 -DCURL_STATICLIB=1 \1;' Makefile \
- && sed -i -E 's;-larchive;/usr/x86_64-w64-mingw32/lib/libarchive.a;' Makefile \
- && sed -i -E 's;(-Wl,-Bdynamic);\1 -lws2_32 -lbcrypt;' Makefile \
+ && tmpfile="$(mktemp "/tmp/XXXXXXXXXXXXXXXX")" \
+ && mv Makefile "${tmpfile:?}" && cat "${tmpfile:?}" \
+ | sed -E 's;^CFLAGS \?=(.*)?$;CFLAGS ?= -DPCRE_STATIC=1 -DCURL_STATICLIB=1 \1;' \
+ | sed -E 's;-larchive;/usr/x86_64-w64-mingw32/lib/libarchive.a;' \
+ | sed -E 's;(-Wl,-Bdynamic);\1 -lws2_32 -lbcrypt;' \
+ | grep -v 'Worktree not clean as it should be' \
+ > Makefile \
+ && rm "${tmpfile:?}" \
;fi \
&& make clean $HORSCHT && make -e -j$(nproc) $HORSCHT \
- && find . -not -wholename './dist*' -delete \
- && ${PKGDEL:?} $PKGS_TO_DEL && ${PKGCLEAN:?} \
&& dirOfDistBundle="$(realpath dist)" \
- && printf '\n SUCCESS :) Distribution bundle is ready in:\n\n %s\n\n Tip: Before pulling out your hair about how to get that archive out of\n your qemu VM. STOP kluding around with silly tools and learn how\n basic tools do the job perfectly fine:\n\n ssh %s@localhost -p2222 -- sh -c '\''true && cd "%s" && tar c *'\'' | tar x\n\n' "${dirOfDistBundle:?}" "$USER" "${dirOfDistBundle:?}" \
+ && printf '\n SUCCESS :) Distribution bundle is ready in:\n\n %s\n\n Tip: Before pulling out your hair about how to get that archive out of\n your qemu VM. STOP kluding around with silly tools and learn how\n basic tools do the job perfectly fine. So go to your host and run:\n\n ssh %s@localhost -p2222 -- sh -c '\''true && cd "%s" && tar c *'\'' | tar x\n\n' "${dirOfDistBundle:?}" "$USER" "${dirOfDistBundle:?}" \
&& true
-
-