build_indy_dist.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # This script requires nasm, and the MSYS2 version of Perl in addition to the standard
  3. # toolchain. You can install these using pacman.
  4. #
  5. case "${MSYSTEM}" in
  6. MINGW32)
  7. _mingw=mingw
  8. _win=win32
  9. ;;
  10. CLANG32)
  11. _mingw=mingw
  12. _win=win32
  13. ;;
  14. MINGW64)
  15. _mingw=mingw64
  16. _win=win64
  17. ;;
  18. CLANG64)
  19. _mingw=mingw64
  20. _win=win64
  21. ;;
  22. CLANGARM64)
  23. _mingw=mingwarm64
  24. _win=winarm64
  25. ;;
  26. esac
  27. versions=("3.3.2" "3.2.3" "3.1.7" "3.0.15")
  28. for ver in "${versions[@]}"; do
  29. if [ ! -e "openssl-${ver}.tar.gz" ]; then
  30. wget https://github.com/openssl/openssl/archive/refs/tags/openssl-${ver}.tar.gz
  31. fi
  32. rm -rf openssl-${ver}
  33. tar zxf "openssl-${ver}.tar.gz"
  34. if [ -d openssl-${ver} ]; then
  35. cd openssl-${ver}
  36. else
  37. cd openssl-openssl-${ver}
  38. fi
  39. /usr/bin/perl Configure ${_mingw} shared
  40. make
  41. zip "openssl-${ver}-${_win}.zip" *.dll
  42. zip "openssl-${ver}-${_win}.zip" LICENSE.txt
  43. cd apps
  44. zip ../"openssl-${ver}-${_win}.zip" openssl.exe
  45. cd ..
  46. zip "openssl-${ver}-${_win}.zip" providers/*.dll
  47. zip "openssl-${ver}-${_win}.zip" engines/*.dll
  48. mv "openssl-${ver}-${_win}.zip" ..
  49. cd ..
  50. done