bundle new component lua-resty-redis which is enabled by default. also added option --without-lua_resty_redis to ./configure for disabling it.
This commit is contained in:
parent
7c210171d1
commit
d41cb7132c
60
t/sanity.t
60
t/sanity.t
|
@ -54,6 +54,7 @@ __DATA__
|
|||
--without-lua_redis_parser disable the lua-redis-parser library
|
||||
--without-lua_rds_parser disable the lua-rds-parser library
|
||||
--without-lua_resty_memcached disable the lua-resty-memcached library
|
||||
--without-lua_resty_redis disable the lua-resty-redis library
|
||||
|
||||
--without-lua51 disable the bundled Lua 5.1 interpreter
|
||||
--with-lua51=PATH specify the external installation of Lua 5.1 by PATH
|
||||
|
@ -2485,3 +2486,62 @@ install: all
|
|||
clean:
|
||||
rm -rf build
|
||||
|
||||
|
||||
=== TEST 43: --without-lua_resty_redis
|
||||
--- cmd: ./configure --dry-run --without-lua_resty_redis
|
||||
--- out
|
||||
platform: linux (linux)
|
||||
cp -rp bundle/ build
|
||||
cd build
|
||||
cd lua-5.1.4
|
||||
gmake linux
|
||||
gmake install INSTALL_TOP=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua
|
||||
export LUA_LIB='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/lib'
|
||||
export LUA_INC='$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include'
|
||||
cd ..
|
||||
cd nginx-1.0.11
|
||||
./configure --prefix=/usr/local/openresty/nginx \
|
||||
--add-module=../ngx_devel_kit-0.2.17 \
|
||||
--add-module=../echo-nginx-module-0.38rc1 \
|
||||
--add-module=../xss-nginx-module-0.03rc9 \
|
||||
--add-module=../ngx_coolkit-0.2rc1 \
|
||||
--add-module=../set-misc-nginx-module-0.22rc5 \
|
||||
--add-module=../form-input-nginx-module-0.07rc5 \
|
||||
--add-module=../encrypted-session-nginx-module-0.02 \
|
||||
--add-module=../ngx_lua-0.5.0rc16 \
|
||||
--add-module=../headers-more-nginx-module-0.17rc1 \
|
||||
--add-module=../srcache-nginx-module-0.13rc3 \
|
||||
--add-module=../array-var-nginx-module-0.03rc1 \
|
||||
--add-module=../memc-nginx-module-0.13rc3 \
|
||||
--add-module=../redis2-nginx-module-0.08rc3 \
|
||||
--add-module=../upstream-keepalive-nginx-module-0.7 \
|
||||
--add-module=../auth-request-nginx-module-0.2 \
|
||||
--add-module=../rds-json-nginx-module-0.12rc7 \
|
||||
--add-module=../rds-csv-nginx-module-0.05rc1 \
|
||||
--with-http_ssl_module
|
||||
cd ../..
|
||||
Type the following commands to build and install:
|
||||
gmake
|
||||
gmake install
|
||||
|
||||
--- makefile
|
||||
.PHONY: all install clean
|
||||
|
||||
all:
|
||||
cd $OPENRESTY_BUILD_DIR/lua-5.1.4 && $(MAKE) linux
|
||||
cd $OPENRESTY_BUILD_DIR/lua-cjson-1.0.3 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include LUA_LIB_DIR=/usr/local/openresty/lualib CC=gcc
|
||||
cd $OPENRESTY_BUILD_DIR/lua-redis-parser-0.09rc6 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include LUA_LIB_DIR=/usr/local/openresty/lualib CC=gcc
|
||||
cd $OPENRESTY_BUILD_DIR/lua-rds-parser-0.04 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include LUA_LIB_DIR=/usr/local/openresty/lualib CC=gcc
|
||||
cd $OPENRESTY_BUILD_DIR/nginx-1.0.11 && $(MAKE)
|
||||
|
||||
install: all
|
||||
cd $OPENRESTY_BUILD_DIR/lua-5.1.4 && $(MAKE) install INSTALL_TOP=$(DESTDIR)/usr/local/openresty/lua
|
||||
cd $OPENRESTY_BUILD_DIR/lua-cjson-1.0.3 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include LUA_LIB_DIR=/usr/local/openresty/lualib CC=gcc
|
||||
cd $OPENRESTY_BUILD_DIR/lua-redis-parser-0.09rc6 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include LUA_LIB_DIR=/usr/local/openresty/lualib CC=gcc
|
||||
cd $OPENRESTY_BUILD_DIR/lua-rds-parser-0.04 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua/include LUA_LIB_DIR=/usr/local/openresty/lualib CC=gcc
|
||||
cd $OPENRESTY_BUILD_DIR/lua-resty-memcached-0.05 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_LIB_DIR=/usr/local/openresty/lualib INSTALL=$OPENRESTY_BUILD_DIR/install
|
||||
cd $OPENRESTY_BUILD_DIR/nginx-1.0.11 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
|
|
|
@ -158,6 +158,9 @@ for my $opt (@ARGV) {
|
|||
} elsif ($opt eq '--without-lua_resty_memcached') {
|
||||
$resty_opts{no_lua_resty_memcached} = 1;
|
||||
|
||||
} elsif ($opt eq '--without-lua_resty_redis') {
|
||||
$resty_opts{no_lua_resty_redis} = 1;
|
||||
|
||||
} elsif ($opt eq '--without-lua_rds_parser') {
|
||||
$resty_opts{no_lua_rds_parser} = 1;
|
||||
|
||||
|
@ -765,6 +768,20 @@ _EOC_
|
|||
push @make_install_cmds, "cd $root_dir/build/$dir && " .
|
||||
"\$(MAKE) install$extra_opts";
|
||||
}
|
||||
|
||||
unless ($opts->{no_lua_resty_redis}) {
|
||||
my $name = 'lua-resty-redis';
|
||||
my $dir = auto_complete $name;
|
||||
if (!defined $dir) {
|
||||
die "No $name found";
|
||||
}
|
||||
|
||||
my $extra_opts = " DESTDIR=\$(DESTDIR) LUA_LIB_DIR=$lualib_prefix"
|
||||
." INSTALL=$root_dir/build/install";
|
||||
|
||||
push @make_install_cmds, "cd $root_dir/build/$dir && " .
|
||||
"\$(MAKE) install$extra_opts";
|
||||
}
|
||||
}
|
||||
|
||||
# prepare nginx configure line
|
||||
|
@ -864,6 +881,7 @@ _EOC_
|
|||
--without-lua_redis_parser disable the lua-redis-parser library
|
||||
--without-lua_rds_parser disable the lua-rds-parser library
|
||||
--without-lua_resty_memcached disable the lua-resty-memcached library
|
||||
--without-lua_resty_redis disable the lua-resty-redis library
|
||||
|
||||
--without-lua51 disable the bundled Lua 5.1 interpreter
|
||||
--with-lua51=PATH specify the external installation of Lua 5.1 by PATH
|
||||
|
|
|
@ -263,6 +263,13 @@ mv agentzh-lua-resty-memcached-* lua-resty-memcached-$ver || exit 1
|
|||
|
||||
#################################
|
||||
|
||||
ver=0.05
|
||||
$root/util/get-tarball "http://github.com/agentzh/lua-resty-redis/tarball/v$ver" -O "lua-resty-redis-$ver.tar.gz" || exit 1
|
||||
tar -xzf lua-resty-redis-$ver.tar.gz || exit 1
|
||||
mv agentzh-lua-resty-redis-* lua-resty-redis-$ver || exit 1
|
||||
|
||||
#################################
|
||||
|
||||
rm *.tar.gz
|
||||
|
||||
cd ..
|
||||
|
|
Loading…
Reference in New Issue