mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
aefb91544b | |||
39f8be8a07 | |||
36e95ce62e | |||
3afa06f29d | |||
da9a356adc | |||
a979e3eaab | |||
907bf9f19e | |||
78674fd211 | |||
08d54b1eb8 | |||
5c7d2b3823 | |||
c07cf89ac4 | |||
cd83ed0590 | |||
60798ca728 | |||
baa293d434 | |||
b7c7c6e64e | |||
0140c1130a | |||
b44ceb748a | |||
7f45ae0f10 | |||
50f13caa09 | |||
26d6e9a6b5 | |||
ba41f86c02 | |||
83280c1280 |
68
specs/ngx_openresty.spec
Normal file
68
specs/ngx_openresty.spec
Normal file
@ -0,0 +1,68 @@
|
||||
%define resty_prefix /opt/
|
||||
%define resty_user nobody
|
||||
%define resty_group nobody
|
||||
|
||||
%define dir_name openresty
|
||||
|
||||
Name: ngx_openresty
|
||||
|
||||
Version: 1.0.5.1
|
||||
Release: 5
|
||||
Summary: nginx for openresty
|
||||
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
License: BSD
|
||||
URL: http://www.openresty.org/
|
||||
|
||||
Source0: ngx_openresty-%{version}rc%{release}.tar.gz
|
||||
|
||||
BuildRoot: %{build_root}
|
||||
|
||||
AutoReqProv: no
|
||||
BuildRequires: gcc >= 3.0, openssl-devel, pcre-devel, readline-devel
|
||||
Requires: openssl, pcre, readline
|
||||
|
||||
%description
|
||||
OpenResty (aka. ngx_openresty) is a full-fledged web application server by bundling the standard Nginx core, lots of 3rd-party Nginx modules, as well as most of their external dependencie
|
||||
|
||||
%prep
|
||||
#%setup -q -n ngx_openresty-%{version}
|
||||
%setup -q -n ngx_openresty-%{version}rc%{release}
|
||||
|
||||
%build
|
||||
#--with-pg_config=opt/pg90/bin/pg_config \
|
||||
#--with-luajit \
|
||||
./configure --prefix=%{resty_prefix}/%{dir_name} \
|
||||
--with-http_postgres_module
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
cur_dir=`pwd`
|
||||
|
||||
cd $RPM_BUILD_ROOT%{resty_prefix}/%{dir_name}/nginx/ && \
|
||||
mkdir client_body_temp fastcgi_temp proxy_temp
|
||||
|
||||
cd $RPM_BUILD_ROOT && (find . -type f | sed -e 's|^./|/|g' > $cur_dir/%{name}.manifest)
|
||||
cd $RPM_BUILD_ROOT && (find . -type l | sed -e 's|^./|/|g' >> $cur_dir/%{name}.manifest)
|
||||
|
||||
echo %{resty_prefix}/%{dir_name}/nginx/logs >> $cur_dir/%{name}.manifest
|
||||
echo %{resty_prefix}/%{dir_name}/nginx/client_body_temp >> $cur_dir/%{name}.manifest
|
||||
echo %{resty_prefix}/%{dir_name}/nginx/fastcgi_temp >> $cur_dir/%{name}.manifest
|
||||
echo %{resty_prefix}/%{dir_name}/nginx/proxy_temp >> $cur_dir/%{name}.manifest
|
||||
|
||||
#echo %{resty_prefix}/%{dir_name}/nginx/proxy_temp >> $cur_dir/%{name}.manifest
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.manifest
|
||||
%defattr(-,%{resty_user},%{resty_group},-)
|
||||
#%doc
|
||||
|
||||
%changelog
|
||||
* Wed Aug 24 2011 liseen <liseen.wan@gmail.com>
|
||||
- initial packaging
|
||||
|
398
t/sanity.t
398
t/sanity.t
File diff suppressed because it is too large
Load Diff
52
util/configure
vendored
52
util/configure
vendored
@ -72,6 +72,7 @@ my @modules = (
|
||||
[http_upstream_keepalive => 'upstream-keepalive-nginx-module'],
|
||||
[http_auth_request => 'auth-request-nginx-module'],
|
||||
[http_rds_json => 'rds-json-nginx-module'],
|
||||
[http_rds_csv => 'rds-csv-nginx-module'],
|
||||
);
|
||||
|
||||
my $without_resty_mods_regex;
|
||||
@ -143,6 +144,9 @@ for my $opt (@ARGV) {
|
||||
} elsif ($opt eq '--without-lua_redis_parser') {
|
||||
$resty_opts{no_lua_redis_parser} = 1;
|
||||
|
||||
} elsif ($opt eq '--without-lua_rds_parser') {
|
||||
$resty_opts{no_lua_rds_parser} = 1;
|
||||
|
||||
} elsif ($opt eq '--with-debug') {
|
||||
$resty_opts{debug} = 1;
|
||||
|
||||
@ -633,6 +637,53 @@ _EOC_
|
||||
push @make_install_cmds, "cd $root_dir/build/$dir && " .
|
||||
"\$(MAKE) install$extra_opts";
|
||||
}
|
||||
|
||||
unless ($opts->{no_lua_rds_parser}) {
|
||||
my $dir = auto_complete 'lua-rds-parser';
|
||||
if (!defined $dir) {
|
||||
die "No lua-rds-parser found";
|
||||
}
|
||||
|
||||
my $lua_inc;
|
||||
if ($opts->{luajit}) {
|
||||
$lua_inc = $ENV{LUAJIT_INC};
|
||||
|
||||
} else {
|
||||
$lua_inc = $ENV{LUA_INC};
|
||||
}
|
||||
|
||||
my $extra_opts = " DESTDIR=\$(DESTDIR) LUA_INCLUDE_DIR=$lua_inc " .
|
||||
"LUA_LIB_DIR=$lualib_prefix";
|
||||
|
||||
if ($on_solaris) {
|
||||
$extra_opts .= " INSTALL=$root_dir/build/install";
|
||||
if ($opts->{debug}) {
|
||||
$extra_opts .= " CFLAGS=\"-g -O0 -Wall\"";
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($opts->{debug}) {
|
||||
$extra_opts .= " CFLAGS=\"-g -O0 -Wall\"";
|
||||
}
|
||||
}
|
||||
|
||||
if ($platform eq 'macosx') {
|
||||
$extra_opts .= " LDFLAGS='-bundle -undefined dynamic_lookup'";
|
||||
}
|
||||
|
||||
if (defined $cc) {
|
||||
$extra_opts .= " CC=$cc";
|
||||
} else {
|
||||
$extra_opts .= " CC=gcc";
|
||||
}
|
||||
|
||||
push @make_cmds, "cd $root_dir/build/$dir && ".
|
||||
"\$(MAKE)$extra_opts";
|
||||
|
||||
push @make_install_cmds, "cd $root_dir/build/$dir && " .
|
||||
"\$(MAKE) install$extra_opts";
|
||||
}
|
||||
}
|
||||
|
||||
# prepare nginx configure line
|
||||
@ -727,6 +778,7 @@ _EOC_
|
||||
|
||||
--without-lua_cjson disable the lua-cjson library
|
||||
--without-lua_redis_parser disable the lua-redis-parser library
|
||||
--without-lua_rds_parser disable the lua-rds-parser library
|
||||
|
||||
--without-lua51 disable the bundled Lua 5.1 interpreter
|
||||
--with-luajit enable LuaJIT 2.0
|
||||
|
@ -53,7 +53,7 @@ sed -i $"s/NGINX_VERSION \".unknown/NGINX_VERSION \".$minor_ver/" \
|
||||
./nginx-no_pool.patch || exit 1
|
||||
rm -rf no-pool-nginx-$ver
|
||||
|
||||
ver=0.37rc1
|
||||
ver=0.37rc2
|
||||
$root/util/get-tarball "http://github.com/agentzh/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1
|
||||
tar -xzf echo-nginx-module-$ver.tar.gz || exit 1
|
||||
mv agentzh-echo-nginx-module-* echo-nginx-module-$ver || exit 1
|
||||
@ -73,11 +73,16 @@ $root/util/get-tarball "http://github.com/agentzh/set-misc-nginx-module/tarball/
|
||||
tar -xzf set-misc-nginx-module-$ver.tar.gz || exit 1
|
||||
mv agentzh-set-misc-nginx-module-* set-misc-nginx-module-$ver || exit 1
|
||||
|
||||
ver=0.12rc1
|
||||
ver=0.12rc2
|
||||
$root/util/get-tarball "http://github.com/agentzh/rds-json-nginx-module/tarball/v$ver" -O rds-json-nginx-module-$ver.tar.gz || exit 1
|
||||
tar -xzf rds-json-nginx-module-$ver.tar.gz || exit 1
|
||||
mv agentzh-rds-json-nginx-module-* rds-json-nginx-module-$ver || exit 1
|
||||
|
||||
ver=0.02
|
||||
$root/util/get-tarball "http://github.com/agentzh/rds-csv-nginx-module/tarball/v$ver" -O rds-csv-nginx-module-$ver.tar.gz || exit 1
|
||||
tar -xzf rds-csv-nginx-module-$ver.tar.gz || exit 1
|
||||
mv agentzh-rds-csv-nginx-module-* rds-csv-nginx-module-$ver || exit 1
|
||||
|
||||
ver=0.15
|
||||
$root/util/get-tarball "http://github.com/agentzh/headers-more-nginx-module/tarball/v$ver" -O headers-more-nginx-module-$ver.tar.gz || exit 1
|
||||
tar -xzf headers-more-nginx-module-$ver.tar.gz || exit 1
|
||||
@ -85,14 +90,14 @@ mv agentzh-headers-more-nginx-module-* headers-more-nginx-module-$ver || exit 1
|
||||
|
||||
#################################
|
||||
|
||||
ver=0.1.1rc3
|
||||
ver=0.1.1rc4
|
||||
$root/util/get-tarball "http://github.com/chaoslawful/drizzle-nginx-module/tarball/v$ver" -O drizzle-nginx-module-$ver.tar.gz || exit 1
|
||||
tar -xzf drizzle-nginx-module-$ver.tar.gz || exit 1
|
||||
mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
|
||||
|
||||
#################################
|
||||
|
||||
ver=0.2.1rc9
|
||||
ver=0.3.0
|
||||
$root/util/get-tarball "http://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
|
||||
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
|
||||
mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1
|
||||
@ -212,13 +217,20 @@ cd ..
|
||||
|
||||
#################################
|
||||
|
||||
ver=0.09rc4
|
||||
ver=0.09rc5
|
||||
$root/util/get-tarball "http://github.com/agentzh/lua-redis-parser/tarball/v$ver" -O "lua-redis-parser-$ver.tar.gz" || exit 1
|
||||
tar -xzf lua-redis-parser-$ver.tar.gz || exit 1
|
||||
mv agentzh-lua-redis-parser-* lua-redis-parser-$ver || exit 1
|
||||
|
||||
#################################
|
||||
|
||||
ver=0.03
|
||||
$root/util/get-tarball "http://github.com/agentzh/lua-rds-parser/tarball/v$ver" -O "lua-rds-parser-$ver.tar.gz" || exit 1
|
||||
tar -xzf lua-rds-parser-$ver.tar.gz || exit 1
|
||||
mv agentzh-lua-rds-parser-* lua-rds-parser-$ver || exit 1
|
||||
|
||||
#################################
|
||||
|
||||
rm *.tar.gz
|
||||
|
||||
cd ..
|
||||
|
Reference in New Issue
Block a user