You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

10 months ago
10 months ago
10 months ago
  1. if [ -f "${LIB_DIR}/libpEpwebserver.a" ]; then
  2. echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
  3. exit 0
  4. fi
  5. VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "WEBSERVER_VERSION")
  6. PEP_WEB_SERVER_DIR="${TMP_DIR}/webserver"
  7. if [ ! -d "${PEP_WEB_SERVER_DIR}" ]; then
  8. git clone -b ${VERSION} https://gitea.pep.foundation/pEp.foundation/webserver.git
  9. fi
  10. pushd ${PEP_WEB_SERVER_DIR}
  11. export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c++14 -fPIC"
  12. export LDFLAGS="-arch ${ARCH}"
  13. export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH}"
  14. LOCAL_CONF="\n
  15. \n
  16. NDEBUG=1\n
  17. \n
  18. PREFIX=${CURRENT_LIB_DIR}\n
  19. \n
  20. BOOST_INCLUDE=${PREFIX}/include\n
  21. BOOST_LIB=${PREFIX}/lib\n
  22. \n
  23. "
  24. echo ${LOCAL_CONF} > local.conf
  25. make clean
  26. make
  27. make install
  28. popd
  29. unset CXXFLAGS
  30. unset LDFLAGS
  31. unset CXX
  32. # Copy artefacts ...
  33. cp "${PEP_WEB_SERVER_DIR}/libpEpwebserver.a" "${CURRENT_LIB_DIR}/lib/"
  34. # ... and headers
  35. PEP_HEADER_DIR="${CURRENT_LIB_DIR}/include/pEp"
  36. mkdir -p "${PEP_HEADER_DIR}"
  37. cp -R "${PEP_WEB_SERVER_DIR}/"*.hh "${PEP_HEADER_DIR}"