项目作者: Slicer

项目描述 :
OpenSSL sources and builds used in Slicer-based projects.
高级语言: CMake
项目地址: git://github.com/Slicer/Slicer-OpenSSL.git
创建时间: 2018-01-17T02:55:39Z
项目社区:https://github.com/Slicer/Slicer-OpenSSL

开源协议:BSD 3-Clause "New" or "Revised" License

下载


overview

This project has two roles:

  • configure, build, archive and automatically upload Release and Debug OpenSSL install trees as release assets
  • organize OpenSSL source archives in a dedicated release

For any given Visual Studio generator, three archives are generated and uploaded to the corresponding GitHub release:

  • OpenSSL_<OPENSSL_VERSION>-install-msvc<MSVC_VERSION>-<bitness>-Debug.tar.gz
  • OpenSSL_<OPENSSL_VERSION>-install-msvc<MSVC_VERSION>-<bitness>-Release.tar.gz
  • OpenSSL_<OPENSSL_VERSION>-install-msvc<MSVC_VERSION>-<bitness>.tar.gz

where

  • <OPENSSL_VERSION> is of the form <major>_<minor>_<patch><letter>
  • <MSVC_VERSION> is a four digit number identifying visual studio
  • <bitness> is either 32 or 64

For example:

  • OpenSSL_1_0_2n-install-msvc1900-64-Debug.tar.gz
  • OpenSSL_1_0_2n-install-msvc1900-64-Release.tar.gz
  • OpenSSL_1_0_2n-install-msvc1900-64.tar.gz

prerequisites

guides

upload a new source archives

  1. Download official OpenSSL archive from https://www.openssl.org/source/
  2. Upload archive in the source release
  3. Update release description

add support for building a new version of OpenSSL

  1. Attempt to configure and build OpenSSL disabling upload (see instructions below)
  2. Two possible scenarios:
    • If it succeeds, publish a new tag associated with the current master branch
    • If it fails, update the CMakeLists.txt and try again

build and upload install tree archives for a specific Visual Studio version

Archives for OpenSSL version associated with the CMake variable OPENSSL_VERSION are built. Inspect the
CMakeLists.txt to find out which version is built by default.

  1. Git clone this repository (or download CMakeLists.txt) into a folder such as C:\path\Slicer-OpenSSL
  2. Create a build folder such as C:\path\Slicer-OpenSSL-build
  3. Open Visual Studio terminal for the desired version and architecture
  4. Configure specifying matching Visual Studio generator and architecture as well as PERL_COMMAND, GITHUB_RELEASE_EXECUTABLE and GITHUB_TOKEN options:

    1. set PERL_COMMAND=C:\StrawberryPerl-x64\perl\bin\perl.exe
    2. set GITHUB_RELEASE_EXECUTABLE=D:\Support\github-release-venv\Scripts\githubrelease.exe
    3. set GITHUB_TOKEN=xyz
    4. cd C:\path\Slicer-OpenSSL-build
    5. cmake.exe ^
    6. -DPERL_COMMAND=%PERL_COMMAND% ^
    7. -DGITHUB_RELEASE_EXECUTABLE=%GITHUB_RELEASE_EXECUTABLE% ^
    8. -DGITHUB_TOKEN=%GITHUB_TOKEN% ^
    9. -G "Visual Studio 16 2019" ^
    10. -A x64 ^
    11. -DUPLOAD_PACKAGES=ON ^
    12. ../Slicer-OpenSSL
  5. Build
    Since UPLOAD_PACKAGES is ON, install tree archives are automatically uploaded as
    assets associated with the release named after the selected OPENSSL_VERSION.
    1. cmake.exe --build .
  6. Once archives are uploaded, update the release description (see below)

update release description

The following snippet was designed for updating the description of releases organizing
install tree archives and it should be executed in bash.

It also expects githubrelease command line tool to be in the PATH.

  1. version=1.1.1g
  2. cd /tmp
  3. #
  4. # download assets
  5. #
  6. githubrelease asset Slicer/Slicer-OpenSSL download ${version}
  7. #
  8. # compute SHA256 and generate release description
  9. #
  10. description_file=/tmp/Slicer-OpenSSL-${version}-release-description.txt
  11. download_url_base=https://github.com/Slicer/Slicer-OpenSSL/releases/download/${version}
  12. IFS=$'\n'
  13. for line in $(sha256sum OpenSSL_${version//./_}*); do
  14. sha256=$(echo ${line} | cut -f1 -d" ");
  15. file=$(echo ${line} | cut -f3 -d" ");
  16. md5sum=$(md5sum ${file} | cut -f1 -d" ")
  17. file=${file##*/}
  18. echo -e "* [${file}]($download_url_base/${file})\n * SHA256: \`${sha256}\`\n * MD5: \`${md5sum}\`";
  19. done > ${description_file}
  20. cat ${description_file}
  21. #
  22. # Update release description
  23. #
  24. githubrelease release Slicer/Slicer-OpenSSL edit ${version} --body "$(cat ${description_file})"

license

This project is covered by the OSI-approved BSD 3-clause License.

OpenSSL is distributed under the OpenSSL License. For more information about OpenSSL, visit https://www.openssl.org/