new package: ssdb
This commit is contained in:
parent
0662db1392
commit
ae0f147c89
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -8,7 +8,6 @@
|
||||||
|
chmod u+x "${LEVELDB_PATH}/build_detect_platform"
|
||||||
|
chmod u+x deps/cpy/cpy
|
||||||
|
chmod u+x tools/ssdb-cli
|
||||||
|
- cd "${LEVELDB_PATH}"; ${MAKE}
|
||||||
|
cd src/util; ${MAKE}
|
||||||
|
cd src/net; ${MAKE}
|
||||||
|
cd src/client; ${MAKE}
|
|
@ -0,0 +1,14 @@
|
||||||
|
TERMUX_PKG_HOMEPAGE=https://ssdb.io/
|
||||||
|
TERMUX_PKG_DESCRIPTION="A Redis compatible NoSQL database stored on disk"
|
||||||
|
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
TERMUX_PKG_VERSION=1.9.9
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/ideawu/ssdb/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
||||||
|
TERMUX_PKG_SHA256=a32009950114984d6e468e10d964b0ef1e846077b69d7c7615715fdfa01aaf6e
|
||||||
|
TERMUX_PKG_DEPENDS="leveldb, libc++"
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=true
|
||||||
|
TERMUX_PKG_EXTRA_MAKE_ARGS="PREFIX=$TERMUX_PREFIX/opt/ssdb"
|
||||||
|
|
||||||
|
termux_step_pre_configure() {
|
||||||
|
export TARGET_OS=OS_ANDROID_CROSSCOMPILE
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
--- a/build.sh
|
||||||
|
+++ b/build.sh
|
||||||
|
@@ -66,6 +66,7 @@
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
+if false; then
|
||||||
|
DIR=`pwd`
|
||||||
|
cd $SNAPPY_PATH
|
||||||
|
if [ ! -f Makefile ]; then
|
||||||
|
@@ -79,6 +80,7 @@
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
cd "$DIR"
|
||||||
|
+fi
|
||||||
|
|
||||||
|
|
||||||
|
case "$TARGET_OS" in
|
||||||
|
@@ -132,12 +134,11 @@
|
||||||
|
|
||||||
|
echo "CFLAGS=" >> build_config.mk
|
||||||
|
echo "CFLAGS = -DNDEBUG -D__STDC_FORMAT_MACROS -Wall -O2 -Wno-sign-compare" >> build_config.mk
|
||||||
|
-echo "CFLAGS += ${PLATFORM_CFLAGS}" >> build_config.mk
|
||||||
|
-echo "CFLAGS += -I \"$LEVELDB_PATH/include\"" >> build_config.mk
|
||||||
|
+echo "CFLAGS += ${CXXFLAGS} ${CPPFLAGS}" >> build_config.mk
|
||||||
|
|
||||||
|
echo "CLIBS=" >> build_config.mk
|
||||||
|
-echo "CLIBS += \"$LEVELDB_PATH/out-static/libleveldb.a\"" >> build_config.mk
|
||||||
|
-echo "CLIBS += \"$SNAPPY_PATH/.libs/libsnappy.a\"" >> build_config.mk
|
||||||
|
+echo "CLIBS += ${LDFLAGS}" >> build_config.mk
|
||||||
|
+echo "CLIBS += -lleveldb" >> build_config.mk
|
||||||
|
|
||||||
|
case "$TARGET_OS" in
|
||||||
|
CYGWIN*|FreeBSD|OS_ANDROID_CROSSCOMPILE)
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/ssdb/options.cpp
|
||||||
|
+++ b/src/ssdb/options.cpp
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
max_open_files = (size_t)conf.get_num("leveldb.max_open_files");
|
||||||
|
write_buffer_size = (size_t)conf.get_num("leveldb.write_buffer_size");
|
||||||
|
block_size = (size_t)conf.get_num("leveldb.block_size");
|
||||||
|
- compaction_speed = conf.get_num("leveldb.compaction_speed");
|
||||||
|
+ //compaction_speed = conf.get_num("leveldb.compaction_speed");
|
||||||
|
compression = conf.get_str("leveldb.compression");
|
||||||
|
std::string binlog = conf.get_str("replication.binlog");
|
||||||
|
binlog_capacity = (size_t)conf.get_num("replication.binlog.capacity");
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/ssdb/options.h
|
||||||
|
+++ b/src/ssdb/options.h
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
size_t max_open_files;
|
||||||
|
size_t write_buffer_size;
|
||||||
|
size_t block_size;
|
||||||
|
- int compaction_speed;
|
||||||
|
+ //int compaction_speed;
|
||||||
|
std::string compression;
|
||||||
|
bool binlog;
|
||||||
|
size_t binlog_capacity;
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/ssdb-server.cpp
|
||||||
|
+++ b/src/ssdb-server.cpp
|
||||||
|
@@ -55,7 +55,7 @@
|
||||||
|
log_info("block_size : %d KB", option.block_size);
|
||||||
|
log_info("write_buffer : %d MB", option.write_buffer_size);
|
||||||
|
log_info("max_open_files : %d", option.max_open_files);
|
||||||
|
- log_info("compaction_speed : %d MB/s", option.compaction_speed);
|
||||||
|
+ //log_info("compaction_speed : %d MB/s", option.compaction_speed);
|
||||||
|
log_info("compression : %s", option.compression.c_str());
|
||||||
|
log_info("binlog : %s", option.binlog? "yes" : "no");
|
||||||
|
log_info("binlog_capacity : %d", option.binlog_capacity);
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/ssdb/ssdb_impl.cpp
|
||||||
|
+++ b/src/ssdb/ssdb_impl.cpp
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
ssdb->options.block_cache = leveldb::NewLRUCache(opt.cache_size * 1048576);
|
||||||
|
ssdb->options.block_size = opt.block_size * 1024;
|
||||||
|
ssdb->options.write_buffer_size = opt.write_buffer_size * 1024 * 1024;
|
||||||
|
- ssdb->options.compaction_speed = opt.compaction_speed;
|
||||||
|
+ //ssdb->options.compaction_speed = opt.compaction_speed;
|
||||||
|
if(opt.compression == "yes"){
|
||||||
|
ssdb->options.compression = leveldb::kSnappyCompression;
|
||||||
|
}else{
|
Loading…
Reference in New Issue