mirror of
https://github.com/falk-werner/webfused
synced 2024-10-27 20:44:08 +00:00
install dependencies directly instead of using subprojects
This commit is contained in:
parent
7d5e4be311
commit
44f809d7bd
@ -37,6 +37,7 @@ env:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- sudo pip3 install --system meson
|
- sudo pip3 install --system meson
|
||||||
|
- ./install_deps
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- meson -Dbuildtype=$BUILD_TYPE -Db_coverage=$COVERAGE build
|
- meson -Dbuildtype=$BUILD_TYPE -Db_coverage=$COVERAGE build
|
||||||
|
72
install_deps.sh
Executable file
72
install_deps.sh
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PACKAGES="libfuse lws jansson"
|
||||||
|
|
||||||
|
libfuse_VERSION=3.9.1
|
||||||
|
libfuse_URL=https://github.com/libfuse/libfuse/archive/fuse-${libfuse_VERSION}.tar.gz
|
||||||
|
libfuse_MD5=5f7c1062def710d8b60343524a18cc82
|
||||||
|
libfuse_DIR=libfuse-fuse-${libfuse_VERSION}
|
||||||
|
libfuse_TYPE=meson
|
||||||
|
|
||||||
|
lws_VERSION=3.2.0
|
||||||
|
lws_URL=https://github.com/warmcat/libwebsockets/archive/v${lws_VERSION}.tar.gz
|
||||||
|
lws_MD5=1d06f5602604e67e6f50cef9857c6b0c
|
||||||
|
lws_DIR=libwebsockets-${lws_VERSION}
|
||||||
|
lws_TYPE=cmake
|
||||||
|
|
||||||
|
jansson_VERSION=2.12
|
||||||
|
jansson_URL=https://github.com/akheron/jansson/archive/v${jansson_VERSION}.tar.gz
|
||||||
|
jansson_MD5=c4b106528d5ffb521178565de1ba950d
|
||||||
|
jansson_DIR=jansson-${jansson_VERSION}
|
||||||
|
jansson_TYPE=cmake
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
install_package() {
|
||||||
|
local PACKAGE="$1"
|
||||||
|
local PACKAGE_VERSION="${PACKAGE}_VERSION"
|
||||||
|
local PACKAGE_URL="${PACKAGE}_URL"
|
||||||
|
local PACKAGE_MD5="${PACKAGE}_MD5"
|
||||||
|
local PACKAGE_TYPE="${PACKAGE}_TYPE"
|
||||||
|
local PACKAGE_DIR="${PACKAGE}_DIR"
|
||||||
|
local FILENAME="${PACKAGE}_${!PACKAGE_VERSION}.tar.gz"
|
||||||
|
|
||||||
|
wget "${!PACKAGE_URL}" -O "${FILENAME}"
|
||||||
|
md5sum -c <(echo "${!PACKAGE_MD5}" "${FILENAME}")
|
||||||
|
tar -xf ${FILENAME}
|
||||||
|
|
||||||
|
case "${!PACKAGE_TYPE}" in
|
||||||
|
meson)
|
||||||
|
cd "${!PACKAGE_DIR}"
|
||||||
|
meson build
|
||||||
|
cd build
|
||||||
|
ninja
|
||||||
|
ninja install
|
||||||
|
cd ../..
|
||||||
|
;;
|
||||||
|
cmake)
|
||||||
|
mkdir "${!PACKAGE_DIR}/build"
|
||||||
|
cd "${!PACKAGE_DIR}/build"
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd ../..
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "error: unknown package type ${!PACKAGE_TYPE}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CURRENT_DIR=$(pwd)
|
||||||
|
WORKING_DIR=$(mktemp -d /tmp/install_deps_XXXXXX)
|
||||||
|
cd ${WORKING_DIR}
|
||||||
|
|
||||||
|
for package in ${PACKAGES} ; do
|
||||||
|
install_package $package
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ${CURRENT_DIR}
|
||||||
|
#rm -rf ${WORKING_DIR}
|
11
meson.build
11
meson.build
@ -8,15 +8,10 @@ openssl_dep = dependency('openssl', version: '>=1.1.1')
|
|||||||
libconfig_dep = dependency('libconfig', version: '>=1.5')
|
libconfig_dep = dependency('libconfig', version: '>=1.5')
|
||||||
pam_dep = c_compiler.find_library('pam')
|
pam_dep = c_compiler.find_library('pam')
|
||||||
|
|
||||||
libwebsockets_dep = dependency('libwebsockets', version: '>=4.0.0', required: false)
|
libwebsockets_dep = dependency('libwebsockets', version: '>=3.0.0')
|
||||||
if not libwebsockets_dep.found()
|
jansson_dep = dependency('jansson', version: '>=2.11')
|
||||||
cmake = import('cmake')
|
libfuse_dep = dependency('fuse3', version: '>=3.8.0')
|
||||||
libwebsockets = cmake.subproject('libwebsockets')
|
|
||||||
libwebsockets_dep = libwebsockets.dependency('websockets_shared')
|
|
||||||
endif
|
|
||||||
|
|
||||||
jansson_dep = dependency('jansson', version: '>=2.11', fallback: ['jansson', 'jansson_dep'])
|
|
||||||
libfuse_dep = dependency('fuse3', version: '>=3.8.0', fallback: ['fuse3', 'libfuse_dep'])
|
|
||||||
webfuse_adapter_dep = dependency('webfuse', version: '>=0.5.0',
|
webfuse_adapter_dep = dependency('webfuse', version: '>=0.5.0',
|
||||||
fallback: ['webfuse', 'webfuse_dep'], default_options: ['without_tests=true'])
|
fallback: ['webfuse', 'webfuse_dep'], default_options: ['without_tests=true'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user