mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
Merge pull request #1 from falk-werner/meson_build
Switched to meson build
This commit is contained in:
commit
a4aa1fd08c
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/build/
|
||||
/.deps/
|
||||
/.vscode/
|
||||
/.vscode/
|
||||
/subprojects/*
|
||||
!/subprojects/*.wrap
|
49
.travis.yml
49
.travis.yml
@ -14,49 +14,18 @@ addons:
|
||||
- pkgconf
|
||||
- wget
|
||||
- ca-certificates
|
||||
- python3
|
||||
- python3-pip
|
||||
- python3-setuptools
|
||||
- python3-wheel
|
||||
- ninja-build
|
||||
|
||||
before_install:
|
||||
- mkdir .deps
|
||||
- cd .deps
|
||||
# libwebsockets
|
||||
- wget https://github.com/warmcat/libwebsockets/archive/v3.2.0.tar.gz -O libwebsockets.tar.gz
|
||||
- tar -xf libwebsockets.tar.gz
|
||||
- cd libwebsockets-3.2.0
|
||||
- mkdir .build
|
||||
- cd .build
|
||||
- cmake ..
|
||||
- make
|
||||
- sudo make install
|
||||
- cd ..
|
||||
- cd ..
|
||||
# jansson
|
||||
- wget https://github.com/akheron/jansson/archive/v2.12.tar.gz -O jansson.tar.gz
|
||||
- tar -xf jansson.tar.gz
|
||||
- cd jansson-2.12
|
||||
- mkdir .build
|
||||
- cd .build
|
||||
- cmake ..
|
||||
- make
|
||||
- sudo make install
|
||||
- cd ..
|
||||
- cd ..
|
||||
# libwebfuse
|
||||
- wget https://github.com/falk-werner/webfuse/archive/v0.2.0.tar.gz -O webfuse.tar.gz
|
||||
- tar -xf webfuse.tar.gz
|
||||
- cd webfuse-0.2.0
|
||||
- mkdir .build
|
||||
- cd .build
|
||||
- cmake -DWITHOUT_ADAPTER=ON ..
|
||||
- make
|
||||
- sudo make install
|
||||
- cd ..
|
||||
- cd ..
|
||||
- cd ..
|
||||
- sudo pip3 install --system meson
|
||||
|
||||
before_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- meson build
|
||||
|
||||
script:
|
||||
make
|
||||
- cd build
|
||||
- ninja
|
@ -1,44 +0,0 @@
|
||||
cmake_minimum_required (VERSION 3.10)
|
||||
project(webfuse-provider VERSION 0.1.0 DESCRIPTION "Webfuse provider")
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LWS REQUIRED libwebsockets)
|
||||
pkg_check_modules(WEBFUSE REQUIRED libwebfuse-provider)
|
||||
|
||||
include_directories(
|
||||
"src"
|
||||
${WEBFUSE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${WEBFUSE_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(C_WARNINGS -Wall -Wextra)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_executable(webfuse-provider-app
|
||||
src/main.c
|
||||
)
|
||||
|
||||
set_target_properties(webfuse-provider-app PROPERTIES OUTPUT_NAME webfuse-provider)
|
||||
|
||||
target_link_libraries(webfuse-provider-app PUBLIC webfuse-provider ${WEBFUSE_LIBRARIES})
|
||||
|
||||
# static-filesystem-provider
|
||||
|
||||
add_executable(static-filesystem-provider
|
||||
src/static_filesystem/static_filesystem.c
|
||||
src/static_filesystem/path.c
|
||||
src/static_filesystem/main.c
|
||||
)
|
||||
|
||||
target_link_libraries(static-filesystem-provider PUBLIC webfuse-provider ${WEBFUSE_LIBRARIES})
|
||||
|
42
README.md
42
README.md
@ -8,11 +8,9 @@ Reference implementation of webfuse provider
|
||||
|
||||
To install dependecies, see below.
|
||||
|
||||
cd webfused
|
||||
mkdir build
|
||||
meson build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
ninja
|
||||
./webfuse-provider
|
||||
|
||||
## Dependencies
|
||||
@ -21,38 +19,4 @@ To install dependecies, see below.
|
||||
- [libwebsockets](https://libwebsockets.org/)
|
||||
- [jansson](https://github.com/akheron/jansson)
|
||||
|
||||
### Installing dependencies
|
||||
|
||||
#### libwebsockets
|
||||
|
||||
wget https://github.com/warmcat/libwebsockets/archive/v3.2.0.tar.gz -O libwebsockets.tar.gz
|
||||
tar -xf libwebsockets.tar.gz
|
||||
cd libwebsockets-3.2.0
|
||||
mkdir .build
|
||||
cd .build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
|
||||
#### jansson
|
||||
|
||||
wget https://github.com/akheron/jansson/archive/v2.12.tar.gz -O jansson.tar.gz
|
||||
tar -xf jansson.tar.gz
|
||||
cd jansson-2.12
|
||||
mkdir .build
|
||||
cd .build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
#### webfuse
|
||||
|
||||
wget https://github.com/falk-werner/webfuse/archive/v0.2.0.tar.gz -O webfuse.tar.gz
|
||||
tar -xf webfuse.tar.gz
|
||||
cd webfuse-0.2.0
|
||||
mkdir .build
|
||||
cd .build
|
||||
cmake -DWITHOUT_ADAPTER=ON ..
|
||||
make
|
||||
sudo make install
|
||||
All dependencies are bundled using meson wrap files.
|
||||
|
15
meson.build
Normal file
15
meson.build
Normal file
@ -0,0 +1,15 @@
|
||||
project('webfuse-provider', version: '0.1.0', license: 'LGPL-3.0+')
|
||||
|
||||
|
||||
webfuse_provider_dep = dependency('webfuse_provider', version: '>=0.3.0',
|
||||
fallback: ['webfuse', 'webfuse_provider_dep'], default_options: ['without_adapter=true'])
|
||||
|
||||
executable('webfuse-provider',
|
||||
'src/main.c',
|
||||
dependencies: [webfuse_provider_dep])
|
||||
|
||||
executable('static-filesystem-provider',
|
||||
'src/static_filesystem/static_filesystem.c',
|
||||
'src/static_filesystem/path.c',
|
||||
'src/static_filesystem/main.c',
|
||||
dependencies: [webfuse_provider_dep])
|
@ -11,8 +11,6 @@
|
||||
|
||||
#include "webfuse_provider.h"
|
||||
|
||||
#define SERVICE_TIMEOUT (1 * 1000)
|
||||
|
||||
struct config
|
||||
{
|
||||
char * url;
|
||||
@ -368,7 +366,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
while (!shutdown_requested)
|
||||
{
|
||||
wfp_client_service(client, SERVICE_TIMEOUT);
|
||||
wfp_client_service(client);
|
||||
}
|
||||
|
||||
wfp_client_dispose(client);
|
||||
|
@ -7,8 +7,6 @@
|
||||
#include "webfuse_provider.h"
|
||||
#include "static_filesystem.h"
|
||||
|
||||
#define SERVICE_TIMEOUT (1 * 1000)
|
||||
|
||||
struct args
|
||||
{
|
||||
char const * url;
|
||||
@ -93,7 +91,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
while (!shutdown_requested)
|
||||
{
|
||||
wfp_client_service(client, SERVICE_TIMEOUT);
|
||||
wfp_client_service(client);
|
||||
}
|
||||
|
||||
wfp_client_dispose(client);
|
||||
|
10
subprojects/jansson.wrap
Normal file
10
subprojects/jansson.wrap
Normal file
@ -0,0 +1,10 @@
|
||||
[wrap-file]
|
||||
directory = jansson-2.11
|
||||
|
||||
source_url = http://www.digip.org/jansson/releases/jansson-2.11.tar.bz2
|
||||
source_filename = jansson-2.11.tar.bz2
|
||||
source_hash = 783132e2fc970feefc2fa54199ef65ee020bd8e0e991a78ea44b8586353a0947
|
||||
|
||||
patch_url = https://wrapdb.mesonbuild.com/v1/projects/jansson/2.11/3/get_zip
|
||||
patch_filename = jansson-2.11-3-wrap.zip
|
||||
patch_hash = 0bcac510994890048d42658c674e33dd7d88715fc1e3bf49d10012f57b0e0020
|
6
subprojects/libwebsockets.wrap
Normal file
6
subprojects/libwebsockets.wrap
Normal file
@ -0,0 +1,6 @@
|
||||
[wrap-file]
|
||||
directory = libwebsockets-4.0.13
|
||||
|
||||
source_url = https://github.com/warmcat/libwebsockets/archive/v4.0.13.zip
|
||||
source_filename = v4.0.13.zip
|
||||
source_hash = 0914ea3fdec496daf6b6a5c00f7ba1b52eb8cc3d55b66685df92920b232fd7a5
|
6
subprojects/webfuse.wrap
Normal file
6
subprojects/webfuse.wrap
Normal file
@ -0,0 +1,6 @@
|
||||
[wrap-file]
|
||||
directory = webfuse-0.3.1
|
||||
|
||||
source_url = https://github.com/falk-werner/webfuse/archive/v0.3.1.tar.gz
|
||||
source_filename = v0.3.1.tar.gz
|
||||
source_hash = 46624b5f29e8f87dd1aebfce3b13ca87e766bc59546b6e5f49665d2f8c555d62
|
Loading…
Reference in New Issue
Block a user