diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-10-10 23:43:47 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-10-11 00:08:40 +0200 |
| commit | 28ae865e5ecad9b398ac21fa148fc4b93c987226 (patch) | |
| tree | 1f045b4c55d9556557758f5cfa9457d07e988aa9 | |
| parent | e3177b549d5fb9c065d336cbb95301f48e29863a (diff) | |
| download | slcl-28ae865e5ecad9b398ac21fa148fc4b93c987226.tar.gz | |
Apply slweb renaming to libweb
| -rw-r--r-- | .gitmodules | 6 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | Makefile | 22 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | auth.c | 2 | ||||
| -rw-r--r-- | auth.h | 2 | ||||
| m--------- | libweb | 0 | ||||
| -rw-r--r-- | main.c | 6 | ||||
| -rw-r--r-- | page.c | 4 | ||||
| -rw-r--r-- | page.h | 2 | ||||
| m--------- | slweb | 0 |
11 files changed, 27 insertions, 27 deletions
diff --git a/.gitmodules b/.gitmodules index 7dc08da..805a102 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "slweb"] - path = slweb - url = https://gitea.privatedns.org/xavi/slweb +[submodule "libweb"] + path = libweb + url = https://gitea.privatedns.org/xavi/libweb diff --git a/CMakeLists.txt b/CMakeLists.txt index a9dde62..91d4673 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,10 +12,10 @@ add_executable(${PROJECT_NAME} ) target_compile_options(${PROJECT_NAME} PRIVATE -Wall) target_compile_definitions(${PROJECT_NAME} PRIVATE _FILE_OFFSET_BITS=64) -add_subdirectory(slweb) +add_subdirectory(libweb) find_package(cJSON 1.0 REQUIRED) find_package(OpenSSL 2.0 REQUIRED) -target_link_libraries(${PROJECT_NAME} PRIVATE slweb dynstr cjson OpenSSL::SSL) +target_link_libraries(${PROJECT_NAME} PRIVATE libweb dynstr cjson OpenSSL::SSL) install(TARGETS ${PROJECT_NAME}) install(FILES usergen TYPE BIN @@ -5,14 +5,14 @@ DST = $(PREFIX)/bin PROJECT = slcl O = -Og CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit. -CFLAGS = $(O) $(CDEFS) -g -Wall -Islweb/include -Islweb/dynstr/include \ +CFLAGS = $(O) $(CDEFS) -g -Wall -Ilibweb/include -Ilibweb/dynstr/include \ -MD -MF $(@:.o=.d) LIBS = -lcjson -lssl -lm -lcrypto DEPS = $(OBJECTS:.o=.d) -DYNSTR = slweb/dynstr/libdynstr.a -DYNSTR_FLAGS = -Lslweb/dynstr -ldynstr -SLWEB = slweb/libslweb.a -SLWEB_FLAGS = -Lslweb -lslweb +DYNSTR = libweb/dynstr/libdynstr.a +DYNSTR_FLAGS = -Llibweb/dynstr -ldynstr +LIBWEB = libweb/libslweb.a +SLWEB_FLAGS = -Llibweb -lweb OBJECTS = \ auth.o \ base64.o \ @@ -34,18 +34,18 @@ install: all usergen clean: rm -f $(OBJECTS) $(DEPS) - +cd slweb && $(MAKE) clean - +cd slweb/dynstr && $(MAKE) clean + +cd libweb && $(MAKE) clean + +cd libweb/dynstr && $(MAKE) clean FORCE: -$(PROJECT): $(OBJECTS) $(DYNSTR) $(SLWEB) +$(PROJECT): $(OBJECTS) $(DYNSTR) $(LIBWEB) $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) $(SLWEB_FLAGS) $(DYNSTR_FLAGS) -o $@ $(DYNSTR): FORCE - +cd slweb/dynstr && $(MAKE) + +cd libweb/dynstr && $(MAKE) -$(SLWEB): FORCE - +cd slweb && $(MAKE) +$(LIBWEB): FORCE + +cd libweb && $(MAKE) -include $(DEPS) @@ -20,7 +20,7 @@ portability, minimalism, simplicity and efficiency. - Private access directory with file uploading, with configurable quota. - Read-only public file sharing. -- Uses [`slweb`](https://gitea.privatedns.org/xavi/slweb), a tiny web framework. +- Uses [`libweb`](https://gitea.privatedns.org/xavi/libweb), a tiny web framework. - A simple JSON file as the credentials database. - No JavaScript. @@ -48,8 +48,8 @@ to `slcl`. If required, encryption should be done before uploading e.g.: using - OpenSSL >= 2.0. - cJSON >= 1.7.15. - [`dynstr`](https://gitea.privatedns.org/xavi/dynstr) -(provided as a `git` submodule by `slweb`). -- [`slweb`](https://gitea.privatedns.org/xavi/slweb) +(provided as a `git` submodule by `libweb`). +- [`libweb`](https://gitea.privatedns.org/xavi/libweb) (provided as a `git` submodule). - `jq` (for [`usergen`](usergen) only). - CMake (optional). @@ -1,7 +1,7 @@ #include "auth.h" #include "hex.h" #include "jwt.h" -#include <slweb/http.h> +#include <libweb/http.h> #include <cjson/cJSON.h> #include <dynstr.h> #include <openssl/sha.h> @@ -1,7 +1,7 @@ #ifndef AUTH_H #define AUTH_H -#include <slweb/http.h> +#include <libweb/http.h> #include <stdbool.h> struct auth *auth_alloc(const char *dir); diff --git a/libweb b/libweb new file mode 160000 +Subproject 0222b75e8554796548e079aa3393c512ae30ac2 @@ -5,9 +5,9 @@ #include "hex.h" #include "page.h" #include "style.h" -#include <slweb/handler.h> -#include <slweb/http.h> -#include <slweb/wildcard_cmp.h> +#include <libweb/handler.h> +#include <libweb/http.h> +#include <libweb/wildcard_cmp.h> #include <openssl/err.h> #include <openssl/rand.h> #include <dynstr.h> @@ -1,8 +1,8 @@ #define _POSIX_C_SOURCE 200809L #include "page.h" -#include <slweb/html.h> -#include <slweb/http.h> +#include <libweb/html.h> +#include <libweb/http.h> #include <dynstr.h> #include <dirent.h> #include <fcntl.h> @@ -1,7 +1,7 @@ #ifndef PAGE_H #define PAGE_H -#include <slweb/http.h> +#include <libweb/http.h> #include <stdbool.h> #include <stddef.h> diff --git a/slweb b/slweb deleted file mode 160000 -Subproject b43adf9a005f93550167c36a33c183ebedd1362 |
