now we automatically build the bundled libdrizzle library.
This commit is contained in:
parent
84989d2d28
commit
eeb106c6cb
31
t/sanity.t
31
t/sanity.t
|
@ -173,6 +173,13 @@ Options directly inherited from nginx
|
|||
--- out
|
||||
cp -r bundle/ build/
|
||||
cd build
|
||||
cd libdrizzle-0.8
|
||||
./configure --prefix=/usr/local/openresty/libdrizzle
|
||||
make
|
||||
make install DESTDIR=$OPENRESTY_BUILD_DIR/libdrizzle-root
|
||||
export LIBDRIZZLE_LIB='$OPENRESTY_BUILD_DIR/libdrizzle-root/usr/local/openresty/libdrizzle/lib'
|
||||
export LIBDRIZZLE_INC='$OPENRESTY_BUILD_DIR/libdrizzle-root/usr/local/openresty/libdrizzle/include'
|
||||
cd ..
|
||||
cd lua-5.1.4
|
||||
make linux
|
||||
make install INSTALL_TOP=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua
|
||||
|
@ -197,16 +204,19 @@ cd nginx-0.8.54
|
|||
--add-module=../upstream-keepalive-nginx-module-0.3 \
|
||||
--add-module=../auth-request-nginx-module-0.2 \
|
||||
--add-module=../rds-json-nginx-module-0.11rc2 \
|
||||
--with-ld-opt='-Wl,-rpath=/usr/local/openresty/libdrizzle/lib' \
|
||||
--with-http_ssl_module
|
||||
cd ../..
|
||||
--- makefile
|
||||
.PHONY: all install
|
||||
|
||||
all:
|
||||
cd build/libdrizzle-0.8 && $(MAKE)
|
||||
cd build/lua-5.1.4 && $(MAKE) linux
|
||||
cd build/nginx-0.8.54 && $(MAKE)
|
||||
|
||||
install:
|
||||
cd build/libdrizzle-0.8 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
cd build/lua-5.1.4 && $(MAKE) install INSTALL_TOP=$(DESTDIR)/usr/local/openresty/lua
|
||||
cd build/nginx-0.8.54 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
|
||||
|
@ -220,6 +230,13 @@ clean:
|
|||
--- out
|
||||
cp -r bundle/ build/
|
||||
cd build
|
||||
cd libdrizzle-0.8
|
||||
./configure --prefix=/usr/local/openresty/libdrizzle
|
||||
make
|
||||
make install DESTDIR=$OPENRESTY_BUILD_DIR/libdrizzle-root
|
||||
export LIBDRIZZLE_LIB='$OPENRESTY_BUILD_DIR/libdrizzle-root/usr/local/openresty/libdrizzle/lib'
|
||||
export LIBDRIZZLE_INC='$OPENRESTY_BUILD_DIR/libdrizzle-root/usr/local/openresty/libdrizzle/include'
|
||||
cd ..
|
||||
cd lua-5.1.4
|
||||
make linux
|
||||
make install INSTALL_TOP=$OPENRESTY_BUILD_DIR/lua-root/usr/local/openresty/lua
|
||||
|
@ -245,16 +262,19 @@ cd nginx-0.8.54
|
|||
--add-module=../upstream-keepalive-nginx-module-0.3 \
|
||||
--add-module=../auth-request-nginx-module-0.2 \
|
||||
--add-module=../rds-json-nginx-module-0.11rc2 \
|
||||
--with-ld-opt='-Wl,-rpath=/usr/local/openresty/libdrizzle/lib' \
|
||||
--with-http_ssl_module
|
||||
cd ../..
|
||||
--- makefile
|
||||
.PHONY: all install
|
||||
|
||||
all:
|
||||
cd build/libdrizzle-0.8 && $(MAKE)
|
||||
cd build/lua-5.1.4 && $(MAKE) linux
|
||||
cd build/nginx-0.8.54 && $(MAKE)
|
||||
|
||||
install:
|
||||
cd build/libdrizzle-0.8 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
cd build/lua-5.1.4 && $(MAKE) install INSTALL_TOP=$(DESTDIR)/usr/local/openresty/lua
|
||||
cd build/nginx-0.8.54 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
|
||||
|
@ -277,6 +297,13 @@ clean:
|
|||
--- out
|
||||
cp -r bundle/ build/
|
||||
cd build
|
||||
cd libdrizzle-0.8
|
||||
./configure --prefix=/usr/local/openresty/libdrizzle
|
||||
make
|
||||
make install DESTDIR=$OPENRESTY_BUILD_DIR/libdrizzle-root
|
||||
export LIBDRIZZLE_LIB='$OPENRESTY_BUILD_DIR/libdrizzle-root/usr/local/openresty/libdrizzle/lib'
|
||||
export LIBDRIZZLE_INC='$OPENRESTY_BUILD_DIR/libdrizzle-root/usr/local/openresty/libdrizzle/include'
|
||||
cd ..
|
||||
cd LuaJIT-2.0.0-beta6
|
||||
make PREFIX=/usr/local/openresty/luajit
|
||||
make install PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
|
||||
|
@ -301,17 +328,19 @@ cd nginx-0.8.54
|
|||
--add-module=../upstream-keepalive-nginx-module-0.3 \
|
||||
--add-module=../auth-request-nginx-module-0.2 \
|
||||
--add-module=../rds-json-nginx-module-0.11rc2 \
|
||||
--with-ld-opt='-Wl,-rpath=/usr/local/openresty/luajit/lib' \
|
||||
--with-ld-opt='-Wl,-rpath=/usr/local/openresty/libdrizzle/lib:/usr/local/openresty/luajit/lib' \
|
||||
--with-http_ssl_module
|
||||
cd ../..
|
||||
--- makefile
|
||||
.PHONY: all install
|
||||
|
||||
all:
|
||||
cd build/libdrizzle-0.8 && $(MAKE)
|
||||
cd build/LuaJIT-2.0.0-beta6 && $(MAKE) PREFIX=/usr/local/openresty/luajit
|
||||
cd build/nginx-0.8.54 && $(MAKE)
|
||||
|
||||
install:
|
||||
cd build/libdrizzle-0.8 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
cd build/LuaJIT-2.0.0-beta6 && $(MAKE) install PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
|
||||
cd build/nginx-0.8.54 && $(MAKE) install DESTDIR=$(DESTDIR)
|
||||
|
||||
|
|
|
@ -224,6 +224,37 @@ sub build_resty_opts {
|
|||
|
||||
# build 3rd-party C libraries if required
|
||||
|
||||
if ($opts->{libdrizzle}) {
|
||||
my $libdrizzle_src = auto_complete 'libdrizzle';
|
||||
my $libdrizzle_prefix = "$prefix/libdrizzle";
|
||||
my $libdrizzle_root = File::Spec->rel2abs("libdrizzle-root");
|
||||
|
||||
if (-d $libdrizzle_root) {
|
||||
shell "rm -rf $libdrizzle_root";
|
||||
}
|
||||
|
||||
mkdir $libdrizzle_root or
|
||||
die "create create directory libdrizzle-root: $!\n";
|
||||
|
||||
cd $libdrizzle_src;
|
||||
|
||||
shell "./configure --prefix=$libdrizzle_prefix", $dry_run;
|
||||
shell "make", $dry_run;
|
||||
shell "make install DESTDIR=$libdrizzle_root", $dry_run;
|
||||
|
||||
push @make_cmds, "cd build/$libdrizzle_src && \$(MAKE)";
|
||||
|
||||
push @make_install_cmds, "cd build/$libdrizzle_src && "
|
||||
. "\$(MAKE) install DESTDIR=\$(DESTDIR)";
|
||||
|
||||
env LIBDRIZZLE_LIB => "$libdrizzle_root$libdrizzle_prefix/lib";
|
||||
env LIBDRIZZLE_INC => "$libdrizzle_root$libdrizzle_prefix/include";
|
||||
|
||||
push @ngx_rpaths, "$libdrizzle_prefix/lib";
|
||||
|
||||
cd '..';
|
||||
}
|
||||
|
||||
if ($opts->{luajit}) {
|
||||
my $luajit_src = auto_complete 'LuaJIT';
|
||||
my $luajit_prefix = "$prefix/luajit";
|
||||
|
|
Loading…
Reference in New Issue