build.macos.release.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. set -xe
  3. brew reinstall rapidjson libevent zlib pcre2 pkgconfig
  4. #git clone https://github.com/curl/curl --depth=1
  5. #cd curl
  6. #./buildconf > /dev/null
  7. #./configure --with-ssl=/usr/local/opt/[email protected] --without-mbedtls --disable-ldap --disable-ldaps --disable-rtsp --without-libidn2 > /dev/null
  8. #cmake -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_USE_LIBSSH2=OFF . > /dev/null
  9. #make -j8 > /dev/null
  10. #cd ..
  11. git clone https://github.com/jbeder/yaml-cpp --depth=1
  12. cd yaml-cpp
  13. cmake -DCMAKE_BUILD_TYPE=Release -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF . > /dev/null
  14. make install -j8 > /dev/null
  15. cd ..
  16. git clone https://github.com/ftk/quickjspp --depth=1
  17. cd quickjspp
  18. cmake -DCMAKE_BUILD_TYPE=Release .
  19. make quickjs -j8
  20. install -m644 quickjs/libquickjs.a /usr/local/lib/
  21. install -d /usr/local/include/quickjs/
  22. install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/local/include/quickjs/
  23. install -m644 quickjspp.hpp /usr/local/include/
  24. cd ..
  25. git clone https://github.com/PerMalmberg/libcron --depth=1
  26. cd libcron
  27. git submodule update --init
  28. cmake -DCMAKE_BUILD_TYPE=Release .
  29. make libcron -j8
  30. install -m644 libcron/out/Release/liblibcron.a /usr/local/lib/
  31. install -d /usr/local/include/libcron/
  32. install -m644 libcron/include/libcron/* /usr/local/include/libcron/
  33. install -d /usr/local/include/date/
  34. install -m644 libcron/externals/date/include/date/* /usr/local/include/date/
  35. cd ..
  36. cp /usr/local/lib/libevent.a .
  37. cp /usr/local/opt/zlib/lib/libz.a .
  38. cp /usr/local/lib/libpcre2-8.a .
  39. cmake -DCMAKE_BUILD_TYPE=Release .
  40. make -j8
  41. rm subconverter
  42. c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter -framework CoreFoundation -framework Security $(find CMakeFiles/subconverter.dir/src/ -name "*.o") $(find . -name "*.a") -lcurl -O3
  43. cd base
  44. chmod +rx subconverter
  45. chmod +r ./*
  46. cd ..
  47. mv base subconverter
  48. set +xe