-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManifest_win.rb
More file actions
150 lines (136 loc) · 5.59 KB
/
Copy pathManifest_win.rb
File metadata and controls
150 lines (136 loc) · 5.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Do OS specific things here.
#
def product_platform()
os_short + os_nbits
end
def win_make_flags()
""
end
def pthread_install
"/usr"
end
def vbucketmigrator_configure_flags
end
def curl_test
"#{base_tmp_install()}/bin/libcurl-4.dll"
end
def curl_configure_flags
# Do not use --disable-shared for curl on windows,
# because curl_easy_setopts() seems to go missing.
""
end
def licenses_file
"licenses_win_20101221.tgz"
end
# ------------------------------------------------
# We don't have auto* tools on windows, so we need to copy
# pre-generated files (from some other system) instead.
def autorun_cmd(repo_name)
["cp -Rf #{STARTDIR}/components/autogen/#{repo_name}/* .",
"touch Makefile"]
end
def autosave_cmd(repo_name, extras="")
[]
end
# ------------------------------------------------
load("./Manifest_win#{os_nbits}.rb")
COLLECT_PLATFORM_WIN =
[
{ :desc => "erlang",
:seq => 30,
:src_dir => "/#{builder_erlang_dir()}",
:dist => false,
:force => true,
:dst_dir => "components/Server",
:except => [/.*\/doc/,
/.*\/src/,
/.*\/examples/,
/.*\/include/,
/.*\/Install/,
/.*\/Uninstall/,
/.*\/lib\/cos/,
/.*\/lib\/asn1-/,
/.*\/lib\/edoc-/,
/.*\/lib\/gs-/,
/.*\/lib\/ic-/,
/.*\/lib\/jinterface-/,
/.*\/lib\/megaco-/,
/.*\/lib\/orber-/,
/.*\/lib\/toolbar-/,
/.*\/lib\/wx-/,
]
},
{ :desc => "vcredist",
:seq =>32,
:src_file => "/#{builder_erlang_dir()}/vcredist_x86.exe",
:src_alt => "#{BASE}",
:dist => false,
:dst_dir => "components/Server/bin/erlang"
},
{ :desc => "couchdb",
:seq => 100,
:src_tgz => pull_make("#{BASEX}", "couchdb", VERSION_COUCHDB, "tar.gz",
{ :os_arch => false,
:no_parse_tag => true,
:branch => "origin/refresh",
:premake => autorun_cmd("couchdb") +
["sh ./configure --prefix=#{STARTDIR}/components/Server" +
" --with-js-include=#{STARTDIR}/#{BASE}/spidermonkey-3.7a3-winnt6.1/dist/include"+
" --with-js-lib=#{STARTDIR}/#{BASE}/spidermonkey-3.7a3-winnt6.1/dist/bin" +
" --with-win32-icu-binaries=#{STARTDIR}/#{BASE}/icu4c-4_2_1-Win32-msvc9/icu" +
" --with-erlang=#{builder_erlang_base()}/#{builder_erlang_dir()}/usr/include" +
" --with-win32-curl=#{STARTDIR}/#{BASE}/curl-7.20.1" +
" --with-msvc-redist-dir=#{STARTDIR}/#{BASE}/vcredist_x86.exe" +
" --with-msbuild-dir=#{DOTNET_FRAMEWORK_4}",
"sed -e \"s| INSTALL.gz| |\" <Makefile >Makefile.out",
"cp Makefile.out Makefile"],
:make => ["make -e LOCAL=#{base_tmp_install()}",
"make install",
"make --file=#{STARTDIR}/components/Makefile.couchdb_extra" +
" SRC_DIR=#{STARTDIR}/components/Server ERLANG_VER=#{ERLANG_VER} bdist"]
}),
:dst_dir => "components/Server",
:after => mv_dir_proc()
},
{ :desc => "geocouch",
:seq => 110,
:step => Proc.new {|what|
pull_make("#{BASEX}", "geocouch", VERSION_GEOCOUCH, "tar.gz",
{ :os_arch => false,
:skip_file => true,
:no_parse_tag => true,
:branch => "origin/master",
:make => ["make -e COUCH_SRC=#{STARTDIR}/../couchdb/src/couchdb"]
}).call(what)
FileUtils.mkdir_p("#{STARTDIR}/components/Server/lib/geocouch/ebin")
FileUtils.cp_r(Dir.glob("#{STARTDIR}/../geocouch/build/*"),
"#{STARTDIR}/components/Server/lib/geocouch/ebin")
FileUtils.mkdir_p("#{STARTDIR}/components/Server/etc/couchdb/local.d")
FileUtils.cp_r(Dir.glob("#{STARTDIR}/../geocouch/etc/couchdb/local.d/*"),
"#{STARTDIR}/components/Server/etc/couchdb/local.d")
FileUtils.mkdir_p("#{STARTDIR}/components/Server/share/couchdb/www/script/test")
FileUtils.cp_r(Dir.glob("#{STARTDIR}/../geocouch/share/www/script/test/*"),
"#{STARTDIR}/components/Server/share/couchdb/www/script/test")
}
},
{ :desc => "openssl",
:seq => 200,
:step => Proc.new {|what|
FileUtils.cp("#{STARTDIR}/#{BASE}/openssl/libeay32.dll", "components/Server/bin/")
FileUtils.cp("#{STARTDIR}/#{BASE}/openssl/libeay32.license.txt", "components/Server/bin/")
}
},
{ :desc => "vcredist",
:seq => 250,
:step => Proc.new {|what|
FileUtils.cp("#{STARTDIR}/#{BASE}/vcredist_x86.exe", "components/Server/bin/")
}
},
{ :desc => "cleanup",
:seq => 900,
:step => Proc.new {|what|
FileUtils.rm_rf("components/Server/PR.template")
}
}
]
COLLECT_PLATFORM = COLLECT_PLATFORM_WIN.clone().concat(COLLECT_PLATFORM_WIN_BITSIZE_SPECIFIC)