stunnel / static-curl

static builds cURL with HTTP3
MIT License
231 stars 29 forks source link

Include headers and static libraries into release artifact #60

Closed dtretyakov closed 9 months ago

dtretyakov commented 9 months ago

For developers, which are using libcurl with static dependencies, It would be beneficial to include into release the following:

It may have layout like that:

- bin
  - curl/curl.exe
  - curl-ca-bundle.crt (on Windows)
- include
  - brotli
  ...
  - zstd.h
- lib
  - libbrotlicommon.a
  ...
  - libzstd.a
- licenses
  - LICENSE-brotl
  ...
travislee89 commented 9 months ago

Great idea. I'll modify the scripts to include the headers, libraries and licenses in releases.

dtretyakov commented 9 months ago

In my experiments I was able to collect everything by modifying the install_curl into:

install_curl() {
    mkdir -p "${RELEASE_DIR}/release/curl-linux-${arch}/lib"

    ls -l src/curl
    cp -pf src/curl "${RELEASE_DIR}/release/curl-linux-${arch}/curl"
    cp -a "${PREFIX}/include/" "${RELEASE_DIR}/release/curl-linux-${arch}/include/"
    cp -a include/curl/ "${RELEASE_DIR}/release/curl-linux-${arch}/include/curl/"
    cp -a "${PREFIX}/lib/"*.a "${RELEASE_DIR}/release/curl-linux-${arch}/lib/"
    cp -a "${PREFIX}/lib64/"*.a "${RELEASE_DIR}/release/curl-linux-${arch}/lib/"
    cp -aL lib/.libs/*.a "${RELEASE_DIR}/release/curl-linux-${arch}/lib/"

    if [ ! -f "${RELEASE_DIR}/release/version.txt" ]; then
        echo "${CURL_VERSION}" > "${RELEASE_DIR}/release/version.txt"
    fi
    if [ ! -f "${RELEASE_DIR}/release/version-info.txt" ]; then
        src/curl -V >> "${RELEASE_DIR}/release/version-info.txt"
    fi
}
lars18th commented 9 months ago

Hi,

It will be very useful if you can share you work releasing the artifacts of the libraries.

travislee89 commented 9 months ago

Thanks for your suggestion @dtretyakov I released a version 8.6.0-1 that includes static libraries and headers. https://github.com/stunnel/static-curl/releases/tag/8.6.0-1

cc @lars18th