Create ZIP package.

This commit is contained in:
LoRd_MuldeR 2021-06-08 22:24:45 +02:00
parent 19af64b3e7
commit bd25382764
3 changed files with 46 additions and 25 deletions

2
.gitignore vendored
View File

@ -2,4 +2,6 @@
/*.exe /*.exe
/*.pem /*.pem
/*.txt /*.txt
/*.zip
/.libs /.libs
/.bin

View File

@ -164,6 +164,7 @@ rm -rf "${CURL_DIR}" && mkdir "${CURL_DIR}"
tar -xvf ${pkg_curl} --strip-components=1 -C "${CURL_DIR}" tar -xvf ${pkg_curl} --strip-components=1 -C "${CURL_DIR}"
pushd "${CURL_DIR}" pushd "${CURL_DIR}"
patch -p1 -b < "${BASE_DIR}/patch/curl_mutex_init.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_mutex_init.diff"
patch -p1 -b < "${BASE_DIR}/patch/curl_parseconfig.diff"
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I\"${LIBS_DIR}/include\"" CPPFLAGS="-DNGHTTP2_STATICLIB" LDFLAGS="-static -no-pthread -L\"${LIBS_DIR}/lib\"" LIBS="-latomic -liconv -lcrypt32" PKG_CONFIG_PATH="${LIBS_DIR}/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --with-zlib="${LIBS_DIR}" --with-zstd="${LIBS_DIR}" --with-brotli="${LIBS_DIR}" --with-openssl="${LIBS_DIR}" --with-libssh2="${LIBS_DIR}" --with-nghttp2="${LIBS_DIR}" --with-libidn2="${LIBS_DIR}" --with-ca-bundle="cacert.pem" CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I\"${LIBS_DIR}/include\"" CPPFLAGS="-DNGHTTP2_STATICLIB" LDFLAGS="-static -no-pthread -L\"${LIBS_DIR}/lib\"" LIBS="-latomic -liconv -lcrypt32" PKG_CONFIG_PATH="${LIBS_DIR}/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --with-zlib="${LIBS_DIR}" --with-zstd="${LIBS_DIR}" --with-brotli="${LIBS_DIR}" --with-openssl="${LIBS_DIR}" --with-libssh2="${LIBS_DIR}" --with-nghttp2="${LIBS_DIR}" --with-libidn2="${LIBS_DIR}" --with-ca-bundle="cacert.pem"
make curl_LDFLAGS=-all-static make curl_LDFLAGS=-all-static
strip -s src/curl.exe strip -s src/curl.exe
@ -175,32 +176,37 @@ popd
printf "\n==================== Output ====================\n\n" printf "\n==================== Output ====================\n\n"
readonly OUT_DIR="${BASE_DIR}/.bin" readonly OUT_DIR="${BASE_DIR}/.bin"
rm -rf "${OUT_DIR}" && mkdir "${OUT_DIR}" rm -rf "${OUT_DIR}" && mkdir "${OUT_DIR}"
cp -vf "${CURL_DIR}/src/curl.exe" "${OUT_DIR}/curl.exe" pushd "${OUT_DIR}"
cp -vf "${LIBS_DIR}/cacert.pem" "${OUT_DIR}/cacert.pem" cp -vf "${CURL_DIR}/src/curl.exe" curl.exe
cp -vf "${LIBS_DIR}/manpage.html" "${OUT_DIR}/manpage.html" cp -vf "${LIBS_DIR}/cacert.pem" cacert.pem
unix2dos -n "${CURL_DIR}/COPYING" "${OUT_DIR}/COPYING.txt" cp -vf "${LIBS_DIR}/manpage.html" manpage.html
unix2dos -n "${CURL_DIR}/README" "${OUT_DIR}/README.txt"
unix2dos -n "${CURL_DIR}/CHANGES" "${OUT_DIR}/CHANGES.txt"
mkdir -p "${OUT_DIR}/legal" mkdir -p "${OUT_DIR}/legal"
unix2dos -n "${BROT_DIR}/LICENSE" "${OUT_DIR}/legal/brotli.LICENSE.txt" unix2dos -n "${CURL_DIR}/COPYING" legal/curl.COPYING.txt
unix2dos -n "${BROT_DIR}/README.md" "${OUT_DIR}/legal/brotli.README.md" unix2dos -n "${CURL_DIR}/README" legal/curl.README.txt
unix2dos -n "${ICNV_DIR}/AUTHORS" "${OUT_DIR}/legal/libiconv.AUTHORS.txt" unix2dos -n "${CURL_DIR}/CHANGES" legal/curl.CHANGES.txt
unix2dos -n "${ICNV_DIR}/COPYING" "${OUT_DIR}/legal/libiconv.COPYING.txt" unix2dos -n "${BROT_DIR}/LICENSE" legal/brotli.LICENSE.txt
unix2dos -n "${ICNV_DIR}/README" "${OUT_DIR}/legal/libiconv.README" unix2dos -n "${BROT_DIR}/README.md" legal/brotli.README.md
unix2dos -n "${IDN2_DIR}/AUTHORS" "${OUT_DIR}/legal/libidn2.AUTHORS.txt" unix2dos -n "${ICNV_DIR}/AUTHORS" legal/libiconv.AUTHORS.txt
unix2dos -n "${IDN2_DIR}/COPYING" "${OUT_DIR}/legal/libidn2.COPYING.txt" unix2dos -n "${ICNV_DIR}/COPYING" legal/libiconv.COPYING.txt
unix2dos -n "${IDN2_DIR}/README.md" "${OUT_DIR}/legal/libidn2.README.md" unix2dos -n "${ICNV_DIR}/README" legal/libiconv.README
unix2dos -n "${NGH2_DIR}/AUTHORS" "${OUT_DIR}/legal/nghttp2.AUTHORS.txt" unix2dos -n "${IDN2_DIR}/AUTHORS" legal/libidn2.AUTHORS.txt
unix2dos -n "${NGH2_DIR}/LICENSE" "${OUT_DIR}/legal/nghttp2.LICENSE.txt" unix2dos -n "${IDN2_DIR}/COPYING" legal/libidn2.COPYING.txt
unix2dos -n "${NGH2_DIR}/README.rst" "${OUT_DIR}/legal/nghttp2.README.rst" unix2dos -n "${IDN2_DIR}/README.md" legal/libidn2.README.md
unix2dos -n "${OSSL_DIR}/AUTHORS" "${OUT_DIR}/legal/openssl.AUTHORS.txt" unix2dos -n "${NGH2_DIR}/AUTHORS" legal/nghttp2.AUTHORS.txt
unix2dos -n "${OSSL_DIR}/LICENSE" "${OUT_DIR}/legal/openssl.LICENSE.txt" unix2dos -n "${NGH2_DIR}/COPYING" legal/nghttp2.COPYING.txt
unix2dos -n "${OSSL_DIR}/README" "${OUT_DIR}/legal/openssl.README.txt" unix2dos -n "${NGH2_DIR}/README.rst" legal/nghttp2.README.rst
unix2dos -n "${SSH2_DIR}/COPYING" "${OUT_DIR}/legal/libssh2.COPYING.txt" unix2dos -n "${OSSL_DIR}/AUTHORS" legal/openssl.AUTHORS.txt
unix2dos -n "${SSH2_DIR}/README" "${OUT_DIR}/legal/libssh2.README.txt" unix2dos -n "${OSSL_DIR}/LICENSE" legal/openssl.LICENSE.txt
unix2dos -n "${ZLIB_DIR}/README" "${OUT_DIR}/legal/zlib.README.txt" unix2dos -n "${OSSL_DIR}/README" legal/openssl.README.txt
unix2dos -n "${ZSTD_DIR}/LICENSE" "${OUT_DIR}/legal/zstandard.LICENSE.txt" unix2dos -n "${SSH2_DIR}/COPYING" legal/libssh2.COPYING.txt
unix2dos -n "${ZSTD_DIR}/README.md" "${OUT_DIR}/legal/zstandard.README.md" unix2dos -n "${SSH2_DIR}/README" legal/libssh2.README.txt
unix2dos -n "${ZLIB_DIR}/README" legal/zlib.README.txt
unix2dos -n "${ZSTD_DIR}/LICENSE" legal/zstandard.LICENSE.txt
unix2dos -n "${ZSTD_DIR}/README.md" legal/zstandard.README.md
find "${OUT_DIR}" -type f -exec chmod 444 "{}" \; find "${OUT_DIR}" -type f -exec chmod 444 "{}" \;
readonly zfile="${BASE_DIR}/curl-win32.$(date +"%Y-%m-%d").zip"
rm -rf "${zfile}" && zip -v -r -9 "${zfile}" "."
chmod 444 "${zfile}"
popd
printf "\nCompleted.\n\n" printf "\nCompleted.\n\n"

View File

@ -0,0 +1,13 @@
diff --git "a/D:\\_Sandbox\\curl\\curl-src\\src\\tool_parsecfg.c.ori" "b/D:\\_Sandbox\\curl\\curl-src\\src\\tool_parsecfg.c"
index d26774f..9ef1564 100644
--- "a/src/tool_parsecfg.c"
+++ "b/src/tool_parsecfg.c"
@@ -85,7 +85,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
if(!filename || !*filename) {
/* NULL or no file name attempts to load .curlrc from the homedir! */
- char *home = homedir(".curlrc");
+ char *home = NULL; /* homedir(".curlrc"); */
#ifndef WIN32
if(home) {
pathalloc = curl_maprintf("%s%s.curlrc", home, DIR_CHAR);