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.
 

41 lines
1.1 KiB

if [ -f "${LIB_DIR}/libpEpwebserver.a" ]; then
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
exit 0
fi
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "WEBSERVER_VERSION")
PEP_WEB_SERVER_DIR="${TMP_DIR}/webserver"
if [ ! -d "${PEP_WEB_SERVER_DIR}" ]; then
git clone -b ${VERSION} https://gitea.pep.foundation/pEp.foundation/webserver.git
fi
pushd ${PEP_WEB_SERVER_DIR}
export CXXFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} -std=c++14 -fPIC"
export LDFLAGS="-arch ${ARCH}"
export CXX="$(xcrun --sdk ${SDK} -f clang++) -arch ${ARCH} -isysroot ${SDK_PATH}"
LOCAL_CONF="\n
\n
NDEBUG=1\n
\n
PREFIX=${CURRENT_LIB_DIR}\n
\n
BOOST_INCLUDE=${PREFIX}/include\n
BOOST_LIB=${PREFIX}/lib\n
\n
"
echo ${LOCAL_CONF} > local.conf
make clean
make
make install
popd
unset CXXFLAGS
unset LDFLAGS
unset CXX
# Copy artefacts ...
cp "${PEP_WEB_SERVER_DIR}/libpEpwebserver.a" "${CURRENT_LIB_DIR}/lib/"
# ... and headers
PEP_HEADER_DIR="${CURRENT_LIB_DIR}/include/pEp"
mkdir -p "${PEP_HEADER_DIR}"
cp -R "${PEP_WEB_SERVER_DIR}/"*.hh "${PEP_HEADER_DIR}"