itamae-plugin-recipe-nginx_build 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/itamae/plugin/recipe/nginx_build/install.rb +20 -5
- data/lib/itamae/plugin/recipe/nginx_build/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffefba9ed0c058e078cd787aec939a7ac8ca9030
|
4
|
+
data.tar.gz: 66d86358911d65fc3cc90d53cb1289b44ce2f499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: becba8a83c24052ad17c599ee330bb5ba58ae9c95077aed2bf884c5155ffb798ede97385d0c9f7d71fd7237d1004fe5ae9ed73a3d5ac12732b3f8a1d7b818ca9
|
7
|
+
data.tar.gz: aac1f0da61851142f1d07ee62a14b83612e73f1ad8e1bf7cd8619b9477268cde1f704bfeb07205709c5a4490e9c4fd4506f28ca94f22e33d27edc311748f7dd4
|
data/README.md
CHANGED
@@ -9,6 +9,10 @@ def build_nginx_configure_options
|
|
9
9
|
nginx_configure_options
|
10
10
|
end
|
11
11
|
|
12
|
+
def openresty?
|
13
|
+
node[:nginx_build] && node[:nginx_build][:build_target] && node[:nginx_build][:build_target] == 'openresty'
|
14
|
+
end
|
15
|
+
|
12
16
|
nginx_build_bin = "/usr/local/bin/"
|
13
17
|
nginx_build_bin = node[:nginx_build][:bin] if node[:nginx_build] && node[:nginx_build][:bin]
|
14
18
|
|
@@ -38,12 +42,24 @@ modules3rd_path = node[:nginx_build][:modules3rd_path] if node[:nginx_build] &&
|
|
38
42
|
nginx_modules3rds = []
|
39
43
|
nginx_modules3rds = node[:nginx_build][:modules3rds] if node[:nginx_build] && node[:nginx_build][:modules3rds]
|
40
44
|
|
41
|
-
nginx_version = "1.8.0"
|
42
|
-
nginx_version = node[:nginx_build][:nginx_version] if node[:nginx_build] && node[:nginx_build][:nginx_version]
|
43
|
-
|
44
45
|
build_user = node[:server][:user]
|
45
46
|
build_user = node[:nginx_build][:build_user] if node[:nginx_build] && node[:nginx_build][:build_user]
|
46
47
|
|
48
|
+
configure_command = "#{nginx_build_bin}nginx-build -d work -c #{configure_path} -m #{modules3rd_path}"
|
49
|
+
work_dir = ''
|
50
|
+
if openresty?
|
51
|
+
openresty_version = '1.11.2.2'
|
52
|
+
openresty_version = node[:nginx_build][:openresty_version] if node[:nginx_build] && node[:nginx_build][:openresty_version]
|
53
|
+
configure_command << " -openresty -openrestyversion #{openresty_version}"
|
54
|
+
work_dir = "~/work/openresty/#{openresty_version}/openresty-#{openresty_version}"
|
55
|
+
else
|
56
|
+
nginx_version = '1.8.0'
|
57
|
+
nginx_version = node[:nginx_build][:nginx_version] if node[:nginx_build] && node[:nginx_build][:nginx_version]
|
58
|
+
configure_command << " -v #{nginx_version}"
|
59
|
+
work_dir = "~/work/nginx/#{nginx_version}/nginx-#{nginx_version}"
|
60
|
+
end
|
61
|
+
nginx_build_command = "#{configure_command} && cd #{work_dir} && sudo make install"
|
62
|
+
|
47
63
|
if configure_path =~ /^(.+)\/([^\/]+)$/
|
48
64
|
directory $1
|
49
65
|
|
@@ -78,8 +94,7 @@ if modules3rd_path =~ /^(.+)\/([^\/]+)$/
|
|
78
94
|
end
|
79
95
|
|
80
96
|
execute "build-nginx" do
|
81
|
-
command
|
82
|
-
cd ~/work/nginx/#{nginx_version}/nginx-#{nginx_version} && sudo make install"
|
97
|
+
command nginx_build_command
|
83
98
|
user build_user
|
84
99
|
action :nothing
|
85
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-nginx_build
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zaru
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.6.8
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Itamae plugin to install nginx-build
|